$G\cong A\times B$, where $A=\{g\in G\mid g^p=e\}$ and $B=\{g^p\mid g\in G\}$ Let's take an abelian group G, and prime number p. We have the subgroups $A=\{g\in G\mid g^p=e\}$ and $B=\{g^p\mid g\in G\}$. I have to prove that $G\cong A\times B$, with the extra information: G is finite, and does not have an element of order $p^2$.
So far, my idea was to create a homomorphism $G \to A\times B$, where $g\mapsto (g,g^p)$, but that is a mappping from $G\to G\times B$, so I am not really sure how to use A in here. Also, I am confused as to how I have to use the extra information given.
Any tips on how to get me started?
 A: Since $G$ is abelian, all subgroups of $G$ are normal, hence to prove $G\cong A{\times}B$, it suffices to show

*

*$A\cap B=\{e\}$.$\\[4pt]$

*$AB=G$.

First we show $A\cap B=\{e\}$.

Let $x\in A\cap B$.

Since $x\in B$, we have $x=y^p$ for some $y\in G$.

Since $x\in A$, we have $x^p=e$, so
$$y^{p^2}=(y^p)^p=x^p=e$$
hence, since $G$ has no elements of order $p^2$, we must have $|y|=1$ or $|y|=p$.

In either case, we have $y^p=e$, so $x=e$.

Hence $A\cap B=\{e\}$.

Next we show $AB=G$.

Here are two different proofs . . .

Proof #$1$:

Let $f:G\to B$ be given by $f(x)=x^p$.

Then $f$ is a surjective homomorphism from $G$ to $B$ with kernel $A$, hence $G/A\cong B$.

Since $G$ is finite, it follows that $|B|={\Large{\frac{|G|}{|A|}}}$, hence $|G|=|A|{\cdot}|B|$.

Next, lets compute $|AB|$.

If $a_1b_1=a_2b_2$, with $a_1,a_2\in A$ and $b_1,b_2\in B$, then
$$a_1a_2^{-1}=b_2b_1^{-1}$$
hence, since $A\cap B=\{e\}$, it follows that 
$$a_1a_2^{-1}=e=b_2b_1^{-1}$$
so $a_1=a_2$ and $b_1=b_2$.

Thus, of the $|A|{\cdot}|B|$ ways to form an element of $AB$, no two such ways yield the same result.

It follows that $|AB|=|A|{\cdot}|B|$, hence $AB=G$.

Thus proof #$1$ is complete.


Of the two proofs, proof #$1$ is simpler, but proof #$2$ has some advantages . . .

*

*Unlike proof #$1$, proof #$2$ constructively shows, for $x\in G$, how to find $a\in A$ and $b\in B$ such that $x=ab$.$\\[4pt]$

*Proof #$2$ doesn't require $G$ to be finite. It only requires all elements of $G$ to have finite order.

Proof #$2$:

Suppose all elements of $G$ have finite order (which is automatically true if $G$ is finite).

Let $x$ in $G$.

We want to show $x\in AB$.

By assumption, we have $|x|=n$ for some positive integer $n$.

First suppose $p{\,\not\mid\,}n$.

Then there exist integers $s,t$ such that $sp+tn=1$, then letting $y=x^s$ we get
$$
x=x^{sp+tn}
=(x^{sp})(x^{tn})
=\Bigl((x^s)^p\Bigr)\Bigl((x^n)^t\Bigr)
=(y^p)(e^t)
=(e)(y^p)\in AB
$$
Next suppose $p{\,\mid\,}n$.

Then we can write $n=p^km$ for some positive integers $k,m$ where $p\not\mid m$.

If $k\ge 2$, then letting $y=x^{p^{k-1}m}$, we have

*

*$y=x^{p^{k-1}m}=(x^{p^{k-2}m})^p$, so $y\in B$.$\\[4pt]$

*$y^p=(x^{p^{k-1}m})^p=x^{p^km}=x^n=e$, so $y\in A$.

Then $y\in A\cap B$, hence $y=e$, so $x^{p^{k-1}m}=e$, contradiction since the order of $x$ is $n=p^{k}m$ which is greater than $p^{k-1}m$.

It follows that $k=1$, hence $n=pm$.

Since $p{\,\not\mid\,}m$, there exist integers $s,t$ such that $sp+tm=1$.

Then letting $a=x^{tm}$ and $b=x^{sp}$, we have

*

*$a^p=(x^{tm})^p=(x^{pm})^t=(x^n)^t=e^t=e$, so $a\in A$.$\\[4pt]$

*$b=x^{sp}=(x^{s})^p$, so $b\in B$.

hence $x=x^{sp+tm}=(x^{tm})(x^{sp})=ab\in AB$.

Thus proof #$2$ is complete.

With either proof, we have $AB=G$.

Therefore $G\cong A{\times}B$.
