If $G$ is a non-abelian group of order 27, what is the order of its commutator subgroup $G'$? Maybe this question has been posted. Point out if so.
In the book Character Theory Of Finite groups by I.Martin.Isaacs, the following is found at the page:25.  

For instance, if $G$ is a nonabelian group of order 27, then $|G:G'|=9$ and $G$ has exactly 11 conjugacy classes.  

Could someone explain to me? Thanks.
 A: The commutator of a $p$-group cannot be the whole group. The center of a group of order $27$ is nontrivial, so $G/Z(G)$ must be abelian (since it has order either $1$ or $9$; it cannot be cyclic and nontrivial). Therefore, $[G,G]$ cannot be the whole group, since $G$ has a nontrivial abelian quotient.
(More generally, a $p$-group of order $p^n$ always has subgroups of order $p^{n-1}$ which must be normal; the quotient is abelian of order $p$, so the commutator subgroup must be contained in all subgroups of order $p^{n-1}$. In fact, the order of the commutator subgroup of a group of order $p^n$, $n\geq 2$, is at most $p^{n-2}$.)
So the commutator subgroup of a nonabelian group of order $27$ must be of order $3$ or $9$ (it cannot be of order $1$, since $G$ is assumed to be nonabelian).
To see that it cannot be of order $9$, note that there is certainly a normal subgroup of $G$ of order $3$: the center (center cannot be the whole group, since $G$ is nonabelian). So $G/Z(G)$ has order $9$, and hence is necessarily abelian, so the commutator subgroup must be contained in the center. Hence, the commutator subgroup is of order exactly $3$, so $[G:G'] = 9$.
To see that $G$ has exactly $11$ conjugacy classes, remember that the sum of of the orders of the conjugacy classes equals $|G|=27$. The conjugacy classes must have order a power of $3$. A conjugacy class has exactly $1$ element if and only if it corresponds to a central element, so you have $3$ classes of order $1$. The size of the conjugacy class is the index of the centralizer of the element; every element is centralized by elements of the center and by itself, so a noncentral element is centralized by at least $4$ elements, hence the centralizer has order exactly $9$ (cannot be $27$ because it's not central, must be a power of $3$, and cannot be $3$); thus, a noncentral element has exactly $3$ conjugates (the index of the centralizer).
So we have $3$ classes of order $1$ each, accounting for $3$ elements. And every other conjugacy class has exactly three elements in it. Since we need to account for $24$ other elements in the group, there are eight conjugacy classes with 3 elements each. In total, we get 11 conjugacy classes (the three with $1$ element each, the eight with $3$ elements each).
A: Hint 1: if $G$ is non-cyclic group, then $G/Z(G)$ cannot be non-trivial cyclic
Hint 2: any group of order a prime is cyclic
Hint 3 (because of your remark): $G$ is abelian iff $Z(G)=G$

Edit in respond to comments:
Yes, of course. In my answer, since 
(1) $\,|Z(G)|=3\,$ and since 
(2)$\,G/Z(G)\,$ is abelian, 
then $\,G'\leq Z(G)\,$, and since it can't be $\,G'=1\,$ , then it must be $\,G'=Z(G)\,$ of order 3. 
Now, it can't be $\,|Z(G)|=9, 27\,$ as then $\,G/Z(G)\,$ would be cyclic non-trivial, something that already was ruled out, or $\,G\,$ would be abelian, and the center cannot be trivial as $\,G\,$ is a p-group, as you mention...
It is not that the center of $\,G\,$ isn't trivial is "too elementary", but rather that it is a very important (or, as Amitzur would put it, the most important) characteristic of finite p-groups, so I suppose most of us assumed anyone asking what you did must already know this.
