Find the number of subgroups in $Z_p \times Z_p \times Z_p$ let $p$ be a prime number ; I want to find the number of subgroups in $G = Z_p \times Z_p \times Z_p$ $(Z_p = \mathbb{Z}/p\mathbb{Z})$. I know that there is $p^2 + p + 1$ copies of $Z_p$ in $G$ for the following reason : I can generate subgroups isomorphic to $Z_p$ : $<(a,b,c)>$, I have $p^3-1$ distinct nonzero triples, but once I choose a particular triple, there are $p-1$ other triples which generate exactly the same copy of $Z_p$. so the number of isomorphic copies of $Z_p$ in $G$ is $\frac{p^3-1}{p-1}=p^2+p+1$. But I am not sure how should I find the number of isomorphic copies of $Z_p \times Z_p$ in $G$... I know that there is also $p^2+p+1$ copies, but I don't clearly see why ?
I would appreciate your help in advance,
Thanks !
 A: For subspaces isomorphic to $\mathbb{Z}_p\times \mathbb{Z}_p$, you have to pick two linearly independent vectors. There are $p^3-1$ choices for the first vector and $p^3-p$ choices for the second vector. At this point we've overcounted by as many times as the number of distinct ordered bases in $\mathbb{Z}_p\times\mathbb{Z}_p$, which is $(p^2-1)(p^2-p)$ (which can be deduced in the same way). The answer is therefore
$$\frac{(p^3-1)(p^3-p)}{(p^2-1)(p^2-p)}=\frac{p(p^3-1)(p^2-1)}{p(p^2-1)(p-1)}=p^2+p+1$$
A: The group $\;G:=\Bbb Z_p\times\Bbb Z_p\times\Bbb Z_p\;$ is a three dimensional vector space over the field $\;\Bbb Z_p\;$, and its subgroups are exactly the same as its subspaces (why?).
To count the number of $\;1$- dimensional subspace we do as follows: there are $\;p^3-1\;$ non-zero vectors, and the span of each of them generates a $\;1$- D subspace. Yet, in each such space, which has $\;p\;$ elements, there are $\;p-1\;$ elements that each generates the very same subspace (why?), so all in all we have
$$\frac{p^3-1}{p-1}=p^2+p+1\;\;\;\text{one}-D\;\;\text{subspaces}$$
Thinking a little about it is easy to convince oneself that the number of $\;2$- D subspaces is the very same as above (you can see an argument for this in the other answer, but you can also reach this conclusion without the calculations), so now you have what you wanted.
