----
> [!definition] Definition. ([[direct product of groups]])
> Suppose $G_{1}, G_{2}$ are [[group]]s. Then $G_{1} \times G_{2}$ with component-wise multiplication and inverses is a [[group]] of order $|G_{1}|\cdot |G_{2}|$. It is called the **(external) direct product of $G_{1}$ and $G_{2}$**.
>
> The direct product is a [[categorical product]] in the [[category]] $\mathsf{Grp}$. It is the unique [[group|group structure]] on the [[cartesian product]] $G_{1} \times G_{2}$ under which the natural [[projection function|projection]] set-functions $\begin{align}
\begin{array} \\
\pi_{1}:G_{1} \times G_{2} \to G_{1} \\
(g_{1},g_{2}) \mapsto g_{1}
\end{array} \text{ and } \begin{array}
\ \pi_{2}: G_{1} \times G_{2} \to G_{2} \\
(g_{1},g_{2}) \mapsto g_{2}
\end{array}
\end{align}$are [[group homomorphism|group homomorphisms]].
^df2da9
> [!justification]
> It is obvious that multiplication as defined makes $G_{1} \times G_{2}$ into a [[group]].
>
> But we need to show that $G_{1} \times G_{2}$ is indeed a [[categorical product]] in $\mathsf{Grp}$, i.e., that the [[two-object slice category]] $\mathsf{C}_{G_{1},G_{2}}$ has [[terminal object|final objects]], i.e. it satisfies the following [[universal property]]: for any [[group]] $A$ and any choice of [[group homomorphism]]s $\varphi_{G}:A \to G_{1}, \varphi_{G_{2}}:A \to G_{2}$, there exists a unique [[group homomorphism]] $\varphi_{G_{1}} \times \varphi_{G_{2}}$ making the diagram
>
> ```tikz
> \usepackage{tikz-cd}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBoBGAXVJADcBDAGwFcYkQBBEAX1PU1z5CKchWp0mrdgHEA+uQAEAHSV4AtvAVyATDz4gM2PASLbSxcQxZtEIOeT38jQ06W2XJNu7N3dxMKABzeCJQADMAJwg1JFEQHAgkMwlrdhU0LFlge25HEEjo2JoEpABmGispW3TM7J9cmkZ6ACMYRgAFAWNhEAisQIALHDyCmMQyeMTEOMqvFQYItAHanOVVLA04NYWllaztbgaQJtaOrpdbRhgw4d5wqLGJksRk2bSlHeXZaRAaVrAoGViHd8g8kE8puUQP9AYgALSlCZvaofeiLL51A6-Y4tNqdZwmWx9Qa3SjcIA
> \begin{tikzcd}
> & & G_1 \\
> A \arrow[r, "\varphi_{G_1} \times \varphi_{G_{2}}"] \arrow[rru, "\varphi_G", bend left] \arrow[rrd, "\varphi_{G_2}"', bend right] & G_1 \times G_2 \arrow[ru, "\pi_{G_1}"] \arrow[rd, "\pi_{G_2}"'] & \\
> & & G_2
> \end{tikzcd}
> \end{document}
> ```
>
> commute. But this is easy: we already know from the [[universal property of product sets]] that there exists a unique *set-function* $\varphi_{G_{1}} \times \varphi_{G_{2}}$ making the diagram commute in terms of $\mathsf{Set}_{G_{1} , G_{2}}$, and so we just need to show that this function is in fact a [[group homomorphism]]. And showing this is straightforward: $\begin{align} (\varphi_{G_{1}} \times \varphi_{G_{2}})(ab) &= (\varphi_{G_{1}}(ab), \varphi_{G_{2}}(ab)) \\ &= (\varphi_{G_{1}}(a) \varphi_{G_{1}}(b), \varphi_{G_{2}}(a) \varphi_{G_{2}}(b)) \\ &= (\varphi_{G_{1}}(a), \varphi_{G_{2}}(a)) (\varphi_{G_{1}}(b), \varphi_{G_{2}}(b)) \\ &= (\varphi_{G_{1}} \times \varphi_{G_{2}})(a) (\varphi_{G_{1}} \times \varphi_{G_{2}})(b). \end{align}$
> Now suppose the [[cartesian product]] $G_{1} \times G_{2}$ is endowed with [[binary operation|operation]] $\bullet$ with respect to which the set-functions $\pi_{1}$ and $\pi_{2}$ are [[group homomorphism|group homomorphisms]]. Then the [[universal property]] above says that the [[group homomorphism]] $\sigma=\pi_{1} \times \pi_{2}$ uniquely makes the following diagram commute:
>
> ```tikz
> \usepackage{tikz-cd}
> \usepackage{amsmath}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBoBGAXVJADcBDAGwFcYkQAKAcQH1yACADqC8AW3j9eAJlJDBAI2aNGMHAEoQAX1LpMufIRTkK1Ok1bteA4WInStOkBmx4CRGcVMMWbRCCsOui4G7qRSXua+-jxSWqYwUADm8ESgAGYAThCiSGQgOBBIMmY+7MJoWHwgNPIwYFBIAMzE2ulZOYh5BU003hZ+5ZWxNXUNiAC0zTSM9LWMAAp6roYgGViJABY4gSCZ2bk03YjGJf0gg3xytnByFTE7ex0nR8V9URfkD+1Iz4WIjb1ImVBHdhiAZnNFsE3H41pttppKJogA
> \begin{tikzcd}
> & & G_1 \\
> {(G_1 \times G_2, \bullet)} \arrow[rru, "\pi_1", bend left] \arrow[rrd, "\pi_2"', bend right] \arrow[r, "\pi_1 \times \pi_2"] & (G_1 \times G_2, \cdot) \arrow[ru, "\pi_1"] \arrow[rd, "\pi_2"'] & \\
> & & G_2
> \end{tikzcd}
> \end{document}
> ```
> But we see $\begin{align}
> \sigma : (G_{1} \times G_{2}, \bullet) \to & (G_{1} \times G_{2}, \cdot) \\
> \sigma(g_{1},g_{2})= \pi_{1} \times \pi_{2}(g_{1},g_{2}) = & (\pi_{1}(g_{1},g_{2}), \pi_{2}(g_{1},g_{2}))= (g_{1},g_{2})
> \end{align}$
> is actually the *identity homomorphism*, so that for all $(g_{1}, g_{2}), (g_{1}', g_{2}') \in G_{1} \times G_{2}$, $\begin{align}
> (g_{1}, g_{2}) \bullet (g_{1}', g_{2}')= & \id\big( (g_{1}, g_{2}) \bullet (g_{1}', g_{2}') \big) \\
> = & \sigma((g_{1}, g_{2}) \bullet (g_{1}', g_{2}')) \\
> = & \sigma((g_{1}, g_{2}) ) \cdot \sigma(g_{1}', g_{2}') \\
> = & \id \big( (g_{1},g_{2}) \big) \cdot \id \big( g_{1},g_{2} \big) \\
> = & (g_{1},g_{2}) \cdot (g_{1}', g_{2}')
> \end{align}$
> and so we conclude that $\bullet=\cdot$ so the groups are in fact equal.
>
>
^cb886f
> [!basicnonexample] Warning.
> If $G,H$ are [[group|groups]] with $G \cong H \times G$, it does not follow that $H$ is trivial. As a counterexample, consider that $\mathbb{Z}^{\mathbb{N}} \cong \mathbb{Z} \times \mathbb{Z}^{\mathbb{N}}$.
> \
> If both $G,H$ are finite then it does follow $H$ is trivial (just by [[cardinality]] considerations).
>
I am not immediately sure of the answer if exactly one of $G$ or $H$ is finite.
^nonexample
----
####
----
#### References
> [!backlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM [[]]
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```
> [!frontlink]
> ```dataview
> TABLE rows.file.link as "Further Reading"
> FROM outgoing([[]])
> FLATTEN file.tags as Tag
> WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom"
> GROUP BY Tag
> ```