How to deduce the number of elements in a finite group given the group generators? I am studying for my finals, and I came across a question I don't really understand.
We have a finite group $G$ with two generators: $a$ ($a^3=E$) and $b$ ($b^2=E$), where $E$ is the identity. We are also given the relation $(ab)^2=E$. Now the question asks to show that $G$ has $6$ elements that can be represented as
$$E, a, a^2, ab, a^2b, b$$
I am not sure how I can deduce the number of elements in my group from my generators?
Thanks!
 A: Just observe that
$$E, a,a^2, ab, a^2b, b$$
are indeed distinct elements. First observe we must have $a,b\neq E$ or $G$ would be the trivial group, so at least we have $3$ distinct elements. If it was $a^2=a$ then $a^3=a^2=a$ but since $a^3=E$ then it follows $a=E$, which we already said isn't true. If $a^2=b$ then $a^4=b^2=E$ but on the other hand $a^4=a\cdot a^3=a$ which turns again into $a=E$. Hence $E, a, a^2, b$ must be all distinct. We are left with $ab$ and $a^2b$ but on this point is clear how to proceed, $ab$ can't be any of $E, a, b$ as we already said $a$ and $b$ are distinct and also $a,b\neq E$. If it was $ab=a^2$ then $E=(ab)^2=a^4=a$ hence again against our assumptions. We are left with $a^2b$, which by the same reasoning like before can't be any of $E, a^2, b$. If it was $a^2b=a$, then $a^2=a^2b^2=ab$ which can't hold as $a\neq b$. Finally $a^2b\neq ab$ as otherwise $a^2=a$. Hence $E, a,a^2, ab, a^2b, b$ are distinct.
Now we need to understand what are $ba$ and $ba^2$.
Notice $abab=E$, then $bab=a^2$ and thus $ba=a^2b$. For $ba^2$, we have that $(ba^2)^{-1}=ab$, but we know the inverse is unique and $(ab)^{-1}=ab$, so $ba^2=ab$.
Let $x\in G$. Since $a$ and $b$ are generators, then $x$ can be written as an arbitrary (finite) product of $a$ and $b$, which means $x$ can be written as:
$$x=aabaababaaaabababababababb^na^2b$$
and so on, which can in turn be broke down by associativity to these $4$ cases:
$$1) x=a^{n}b^m\qquad 2)x=a^n\qquad 3)x=b^m\qquad 4)x=(ab)^n$$
Take $2)$ for instance, you know that $a^{3}=E$ thus you only need to consider what $n$ is congruent to module $3$. Say $n\equiv 2$ mod $3$, then $x=a^n=a^2$. The same reasoning holds for case $3)$, where now you care about module $2$ as $b^2=E$. Case $1)$ is done by using both $2)$ and $3)$, while it is fairly obvious now how to deal with the last case.
Hence you get only $6$ distinct elements, and your group is actually (up to iso) the diedral group of order $6$.
A: Here is a two-step approach. At first we derive some identities from the reduction rules which enable us to simplify representation of elements. Then we build a $6\times 6$ multiplication table from
\begin{align*}
A:=\{E,a,b,a^2,ab,a^2b\}\subset G\tag{1}
\end{align*}
and check if each row and each column contains all elements from $A$, from which we can conclude that
\begin{align*}\
\color{blue}{A=G}
\end{align*}
Reduction rules:
We know that $\{E,a,b,a^{-1},b^{-1}\}\subseteq G$, since $G$ is a group containing the neutral element $E$ and with each element $g\in G$ the inverse $g^{-1}\in G$, whereby we have to keep in mind, that not always two elements are necessarily pairwise distinct.
At least we take for granted according to the problem statement that $E,a$ and $b$ are pairwise different.
From $a^3=E$ we obtain by multiplication with $a^{-1}$ and similarly from $b^2=E$ we obtain by multiplication with $b^{-1}$
\begin{align*}
a^2&=a^2E=a^2\left(a a^{-1}\right)=a^3 a^{-1}=Ea^{-1}=a^{-1}\tag{2.1}\\
b&=bE=b\left(bb^{-1}\right)=b^2b^{-1}=Eb^{-1}=b^{-1}\tag{2.2}
\end{align*}
From $(ab)^2=E$ we obtain by multiplication with $a^{-1}$ from the left and by multiplication with $b^{-1}$ from the right
\begin{align*}
a^{-1}=a^{-1}E=a^{-1}(ab)^2=\left(a^{-1}a\right)bab=bab\tag{2.3}\\
b^{-1}=Eb^{-1}=(ab)^2b^{-1}=\left(aba\right)\left(bb^{-1}\right)=aba\tag{2.4}
\end{align*}
Combining (2.1) to (2.4) we obtain

\begin{align*}
a^2&=a^{-1}=bab\tag{3.1}\\
b&=b^{-1}=aba\tag{3.2}
\end{align*}

A Pause and a recheck:
Looking again at (1) we observe the set $A$ shows some asymmetries.

*

*We find $a^2$ in $A$ but not $b^2$. No problem. We know from (3.1) and (3.2) that $a^2=a^{-1}$ and we also know that $b^2=E\in A$ and $b=b^{-1}\in A$.


*We find $a^2b$ but not $ab^2$. No problem, since $ab^2=aE=a\in G$.


*We find $ab$, but not $ba$. This should be clarified. We obtain from (3.1) and (3.2)
\begin{align*}
ba&=baE=bab^2=(bab)b=a^2b\in G\\
\end{align*}
and we are now ready to build up the multiplication table.
Multiplication table:
We obtain
\begin{align*}
\begin{array}{c|cccccc}
\cdot &E&a&b&a^2&ab&a^2b\\
\hline
E&E&a&b&a^2&ab&a^2b\\
a&a&a^2&ab&E&a^2b&b\\
b&b&a^2b&E&ab&a^2&a\\
a^2&a^2&E&a^2b&a&b&ab\\
ab&ab&b&a&a^2b&E&a^2\\
a^2b&a^2b&ab&a^2&b&a&E
\end{array}
\end{align*}
Since each row and each column contains the elements from $A$ we conclude
\begin{align*}
\color{blue}{A=G}
\end{align*}
A: The other two answer assume that $a$ has order $3$ (written $o(a)=3$) and $b$ has order $2$ (so $o(b)=2$). However, there is no reason a priori why this should be true: if $a^3=E$ then either $o(a)=3$ or $o(a)=1$. This means that the question does not describe a single group, but rather a family of groups. (Possibly the question has been altered slightly in the re-telling.)
We shall prove that the question as-stated describes three groups:

*

*If $o(a)=3$ and $o(b)=2$ then $G$ has order $6$, and is in fact the dihedral group of order $6$ (equivalently, $S_3$).

*If $o(a)=1$ and $o(b)=2$ then $G$ is cyclic of order two.

*If $o(a)=1$ and $o(b)=1$ then $G$ is the trivial group.

There is a fourth possibility for the orders of the generators:


*$o(a)=3$ and $o(b)=1$.

However, we will prove that this is not possible.
Lets begin by proving that orders of generators are important: note that the relator $(ab)^2=E$ allows you to write every word over $a$ and $b$ in the form $a^ib^j$ for $i\in \{0, 1, 2\}$ and $b\in\{0, 1\}$. Now, suppose some element of this form is actually trivial, so $a^ib^j=E$. Then $a^i=b^{-j}$, and so $o(a^i)=o(b^j)$, and so either $i=0=j$, or $a=E$, or $b=E$, or $a=E=b$ (why?).
This means that we can focus on orders of generators, and we have the four possibilities mentioned above. So lets consider each case and prove that they give the claimed groups, or (in the case of possibility (4)) are not possible.
Now, possibility (1) is covered by the other answers. Possibility (2) is easy to check, as $o(a)=1$ implies $a=E$, and then the relations $a^3=E^3=E$ and $b^2=E$ clearly hold, while $(ab)^2=E$ as $(ab)^2=(Eb)^2=b^2=E$. Similarly, possibility (3) is easy to check. Therefore, we need to prove that possibility (4) is not possible. To see this, suppose $o(b)=1$, so $b=E$, and note the following:
\begin{align*}
(ab)^2&=E\\
(aE)^2&=E\\
a^2&=E
\end{align*}
Combining this with $a^3=E$ gives
$$E=E\cdot E=a^{-2}a^3=a$$
and so $a=E$, so $o(a)=1$. Therefore, if $o(b)=1$ then $o(a)=1$, and so possibility (4) is impossible. QED

Here's a quick conceptual explanation of what's going on: There is a "maximal", with respect to homomorphic images, group generated by $a, b$ and where the relations $a^2=E, b^3=E, (ab)^2=E$ hold. The other answers are investigating this group, which just so happens to be the group $S_3$. There is a specific notation for describing groups in this way, called presentations, and so $S_3$ has presentation $\langle a, b\mid a^2, b^3, (ab)^2\rangle$.
Adding extra relations, like $a=E$ or $b=E$ or $a^ib^j=E$, corresponds to homomorphic images (not necessarily proper homomorphic images, like if we had considered the "new" relation $a^6=E$). So my answer may be interpreted as saying "the group $S_3$ has precisely three homomorphic images: itself, the cyclic group of order two, and the trivial group".
