TITLE: Forming a group from the product of two other groups?
QUESTION [5 upvotes]: So I was talking to someone and they said if you have two groups $K_s$ and $K_t$ and a homomorphism $K_s→Aut(K_t)$, you can form what's called their semi direct product
The idea being that each group embeds as a subgroup of the semi direct product and then you can think about multiplying their elements together...
So let's say you have a group called $ K_s $ and another group called $ K_t $ and want to form a new group $ K_I = K_s \times K_t $. 
Can someone explain this concept of forming a group from the product of two other groups?

REPLY [7 votes]: In the original version of the question, you described a process of attaching elements of one group to elements of the other. This isn't the right picture, and I think the simplest example to start with is the direct product.
If you're familiar with the Cartesian product of sets, the direct product of groups is just "the Cartesian product for groups" (and this can be made precise via category theory if you're interested). Given groups $\mathcal{G}=(G,*_\mathcal{G})$ and $\mathcal{H}=(H,*_\mathcal{H})$, the direct product $\mathcal{G}\times \mathcal{H}$ is the group whose elements are ordered pairs $(g, h)\in G\times H$ - that is, elements of the Cartesian product of the underlying sets of $G$ and $H$ - and where the group operation is given coordinatewise:$$(a,b)*_{\mathcal{G}\times\mathcal{H}}(c,d)=(a*_\mathcal{G}c,b*_\mathcal{H}d).$$
For example, if we take $G$ and $H$ to each be the group of real numbers under addition, their direct product is exactly what we should expect: it's just $\mathbb{R}^2$ with "vector addition" $(a,b)+(c,d)=(a+c,b+d)$ (I'm assuming you've seen vectors before, maybe in a physics class, here; if not, forget the phrase in quotes).
Note that every pair of elements is allowed in the direct product, so there's no "matching up" of elements which occurs at the beginning of the construction. (Incidentally, we can take the direct product of more than two groups - even of infinitely many groups at once! - and there's a related thing, the direct sum, which is different in the infinite case - but that's a side issue.)

Now what about other ways to combine groups?
(For simplicity, from now on I'll conflate a group with its underlying set.)
The semidirect product, as the name suggests, is a generalization of the direct product. Elements of the semidirect product are still pairs of elements from the appropriate groups, but the way they interact is more complicated: now we don't just have the two groups $G$ and $H$, but we also have (as your friend mentioned) a fixed group homomorphism $\phi$ from $H$ to $Aut(G)$ - or, in more intuitive language, an action $\phi$ of $H$ on $G$. These three pieces of data combine together to form the semidirect product $G\rtimes_\phi H$:

Elements of $G\rtimes_\alpha H$ are ordered pairs $(a,b)\in G\times H$. That is, the underlying set of $G\rtimes_\phi H$ is the same as that of the direct product; we're not going to change what an element is, just how elements relate to each other.
Multiplication is given "coordinatewise but with $\phi$ creeping in": we let $$(a,b)*(c,d)=(a\phi_b(c), bd).$$ (Here as is often the convention I'm writing "$\phi_b(c)$" instead of "$\phi(b)(c)$;" it's a lot clearer this way, at least in my opinion.)

Note that in the case of the "trivial action" where $\phi: H\rightarrow Aut(G)$ is the trivial homomorphism (equivalently, $\phi_y(x)=x$ for all $y\in H, x\in G$), we have $a\phi_b(c)=ac$ and we just get the direct product back! So this really is a generalization.


So you see that a similar picture is occurring: we're not matching elements of the groups up with each other, but rather every possible pair of elements plays a role in the group we build. The direct and semidirect products each start by taking the Cartesian product of the underlying sets of the groups in question and then go from there, the direct product putting forth as little effort as possible and the semidrect product doing something which at first probably seems kind of bizarre (but it is very useful).

There are other ways to combine groups - free product, wreath product, ... - which are quite different, but I'll stop here for now; I think digesting the (semi)direct product is a good starting point.