Let $p$ be a prime number and $G$ a non abelian group or order $p^3$. Prove that $Z(G) = [G,G]$.
Solution 1:
Hint (assuming that with $[G:G]$ you mean $G'=[G,G]$, the commutator subgroup): since $G$ is nilpotent, $G'\ne G$; can $Z(G)$ have index $p$ in $G'$?
Solution 2:
Since $G$ is non-abelian group, we should have: $|\frac{G}{Z(G)}|=p^2$. (else, $|\frac{G}{Z(G)}|=p$ and it's mean $G$ is abelian group). Now consider that, every group by order $p^2$ is abelian group (Because if $G$ be a group from order $p^2$. So $|Z(G)|\gt1$. if $|Z(G)|=p$ , then: $|\frac{G}{Z(G)}|=p$ and $\frac{G}{Z(G)}$ should be cyclic. so $G$ should be abelian group. ). Now remember that: if $N$ be a normal subgroup of $G$, then: $\frac{G}{N}$ is abelian group if and only if: $G'\subseteq N$. So, because of $\frac{G}{Z(G)}$ is abelian, $G'\subseteq Z(G)$