# Is this Cayley table correctly computed? If so, is it correct way of presentation of this dihedral group?

Is the following table for $D_4$ correct?

$$\begin{array}{c|c|c|c|c|c|c|c|c|} * & 1 & g & g^2& g^3& f& fg & fg^2 & fg^3 \\ \hline 1 & 1 & g & g^2 & g^3 & f & fg & fg^2 & fg^3 \\ \hline g & g & g^2 & g^3 & 1 & fg^3 & f & fg & fg^2 \\ \hline g^2 & g^2 & g^3 & 1 & g & fg^2 & fg^3 & f & fg \\ \hline g^3 & g^3 & 1 & g & g^2 & fg & fg^2 & fg^3 & f \\ \hline f & f& fg & fg^2 & fg^3 & 1 & g& g^2 & g^3 \\ \hline fg& fg& fg^2 & fg^3 & f& g^3 & 1 & g & g^2 \\ \hline fg^2 & fg^2 & fg^3 & f & fg & g^2 & g^3 & 1 & g \\ \hline fg^3 & fg^3 & f & fg& fg^2 & g & g^2 & g^3 & 1 \\ \hline \end{array}$$

Regarding to this great link and the following codes in GAP, you may check the correctness of the table by yourself:

gap> G:=FreeGroup("a","b");;
a:=G.1;; b:=G.2;;
s:=G/[a^4,b^2,(a*b)^2];;
e:=Size(s);;
T:=MultiplicationTable(s);;

for i in [1..e] do
for j in [1..e] do
Print(T[i][j],"__", "|");
od;
Print("\n");
od;


 1__|2__|3__|4__|5__|6__|7__|8__|
2__|4__|5__|6__|7__|1__|8__|3__|
3__|8__|1__|7__|6__|5__|4__|2__|
4__|6__|7__|1__|8__|2__|3__|5__|
5__|3__|2__|8__|1__|7__|6__|4__|
6__|1__|8__|2__|3__|4__|5__|7__|
7__|5__|4__|3__|2__|8__|1__|6__|
8__|7__|6__|5__|4__|3__|2__|1__|

• Neat code and link. +1 – Amzoti Sep 19 '13 at 6:26
• I agree; I really like the link! +1 – Namaste Sep 20 '13 at 0:07

A presentation of $D_4$ is $\langle g,f \mid g^4=1, f^2=1, gf=fg^{-1}\rangle$. So we have the $8$ elements $\lbrace 1,g,g^2,g^3,f,gf=fg^3,g^2f=fg^2,g^3f=fg\rbrace$, and the multiplication table follows from the relations - as far as I can see, your table is correct.

• It appears that you are missing a relation $f^2 = 1$ in the presentation. – James Sep 18 '13 at 16:46
• Yes, thank you ! – Dietrich Burde Sep 18 '13 at 17:33