Consider we have two (general, not necessarily matrix) Lie groups $G$ and $H$. Their Cartesian product $G\times H$ is again a smooth manifold and a group, therefore a Lie group.
The vector space associated to the Lie algebra of $G\times H$ is $$ T_{(e_G,e_H)}(G\times H) = T_{e_G}G \oplus T_{e_H}=\mathfrak{g}\oplus \mathfrak{h} $$ where $\mathfrak{g}$, $\mathfrak{h}$ are the vector spaces associated to the Lie algebras of $G$ and $H$ respectively.
But what about its Lie algebra structure (i.e. Lie bracket)? How one departs from the vector space $\mathfrak{g}\oplus \mathfrak{h}$ and arrives to its Lie algebra?