closure of direct product of two groups

Given two groups $H$ and $G$ why is it the case that $H \times G$ is closed due to the fact that $G$ and $H$ are closed.

I realise I have answered my question but how does the direct product inherit this? How does it work?

-
Would you care to explain what you mean by closed? – scaaahu Jun 12 '12 at 12:50
Given two element of the product their composition under a binary operator is again in the product of the groups – Ben Davidson Jun 12 '12 at 13:09
@BenDavidson: You may want to say "closed under products", or just say that multiplication is "an operation" (being an operation on a set already implies that the set is closed under the operation). Because one can talk about topological groups, where "closed" actually means something else. – Arturo Magidin Jun 12 '12 at 16:46
I agree with Arturo that it would be a good idea to say "closed under multiplication" in the question. I actually only clicked on this question because I thought there was a chance it might be about topological groups. – Tara B Jun 13 '12 at 9:55
You are not alone @TaraB - I was under the same impression... – user1729 Aug 14 '12 at 8:43

You have to be clear and careful: what is the operation with which $H\times G$ is being endowed? The natural operation is the "componentwise product", $(h,g)*(h',g') = (hh', gg')$, where the operation in the first component is the operation of $H$, and the operation in the second component is the operation of $G$.

Then, since $H$ and $G$ are each closed under multiplication (or whatever the operations of $H$ and $G$ are), it follows that $H\times G$ is closed under component-wise operation.

(Of course, since $H\times G$ is a set, in general it will have many operations that make it into a group; in fact, in all cases except when $H$ and $G$ are one-element groups, there will be at least two distinct operations on $H\times G$ which makes it into a group; so you need to specify what operation you mean when you are dealing with things at this level. Later on, as you become more familiar with the nature of things and abuse of language/notation starts coming in, the fact that $H\times G$ is endowed with the componentwise operation unless explicitly noted otherwise will become a convention.)

-

"how does the direct product inherit this"...inherits from where? We can, in fact, talk of internal and\or external direct product: when we take any two groups $\,G,H\,$ , without any a priori relation between, their external direct product is defined to be (denoting by $\,X\times_{cart}Y\,$ the cartesian product of two sets): $$G\times H:=\left\{ (g,h)\in G\times_{cart} H\,;\, (x,y)\cdot (g,h):=(xg,yh)\,,\,x,g\in G\,,\,y,h\in H\right\}$$so that the direct product (of a finite number) of groups is always a group defined on the cartesian product of those groups. Of course, above $\,xg\,$ is the group operation in $\,G\,$, and something similar goes for the second entry in $\,H$ .

The internal direct product happens when we identity the groups as subgroups of some bigger group containing them both, and the definition goes as above, but this time both group operations in both factors are one and the same.

Finally, from the above, closure of the operation in the direct product follows at once from the corresponding closure of the group operation in each factor.

-