Q:

uniqueness of a complement of a subgroup

let $A$ and $B$ be two subgroups of $G$. we say that $B$ is a complement of $A$ if :

$G=AB$
$A\cap B=\{1\}$

Given a subgroup $A$ of $G$ i don't see how the complement $B$ of $A$ in $G$ is not unique, it seems to me like $A$ and $B$ partition $G$ right? I mean with these two conditions an element in $G$ must be lying in $A$ or in $B$, that is the subgoup $A$ has a complement if $(G-A)\cup\{1\}$ is also a subgroup of $G$ ?

A:

Consider $G = \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z}$. Take $A$ to be the cyclic subgroup generated by $(1,0)$, $B$ to be the cyclic subgroup generated by $(1,1)$, $C$ to be the cyclic subgroup generated by $(0,1)$. Then both $B$ and $C$ are complements of $A$ in $G$. You wrote "it seems to me like $A$ and $B$ partition $G$ right?", so perhaps you are thinking that every element of $G$ either belongs to $A$ or to $B$, but this is not true in general. In the example I just gave $(1,1)$ belongs to neither $A$ nor $C$, and $(0,1)$ belongs to neither $A$ nor $B$. Also consider the set $G - A \cup \{1\} = \{(0,0), (0,1), (1,1)\}$. This is certainly NOT a subgroup of $G$.

A:

I point out a couple of observations which have not yet been made. If $G$ is a finite group, and $G = AB$ for subgroups $A$ and $B$ with $A \cap B= 1$, then we have $|G| = |A||B|$ (see, for example, Herstein's ``Topics in Algebra"), which is usually much bigger
than $|A| + |B| -1= |A \cup B|$. If any group $H$ (finite or not) has a factorization of the form $H = CD$, then we have $H = C^{h}D$ for any $h \in H$, since we can write $h = cd$ for some $c \in C, d \in D$. Then $C^{h}D = C^{cd}D = C^{d}D = (CD)^{d} = H^{d} = H.$
If we also had $C \cap D = 1$, then $C^{h} \cap D = C^{cd} \cap D = C^{d} \cap D
= (C \cap D)^{d} = 1$. Thus the complements to $D$ are closed under conjugation, 
so the only chance for a complement to $D$ to be unique would be if it was normal.
As shown by examples from the comments, even when the complement is normal, it need not be unique.  

