Dihedral Group D4/Cayley Table

Cayley Table for Dihedral Group $D_4$
The Cayley table for the dihedral group $D_4$, whose group presentation is:

can be presented as:
 * $\begin{array}{l|cccccccc}

&    e &     a &   a^2 &   a^3 &     b &   b a & b a^2 & b a^3 \\ \hline e    &     e &     a &   a^2 &   a^3 &     b &   b a & b a^2 & b a^3 \\ a    &     a &   a^2 &   a^3 &     e & b a^3 &     b &   b a & b a^2 \\ a^2  &   a^2 &   a^3 &     e &     a & b a^2 & b a^3 &     b &   b a \\ a^3  &   a^3 &     e &     a &   a^2 &   b a & b a^2 & b a^3 &     b \\ b    &     b &   b a & b a^2 & b a^3 &     e &     a &   a^2 &   a^3 \\ b a  &   b a & b a^2 & b a^3 &     b &   a^3 &     e &     a &   a^2 \\ b a^2 & b a^2 & b a^3 &    b &   b a &   a^2 &   a^3 &     e &     a \\ b a^3 & b a^3 &    b &   b a & b a^2 &     a &   a^2 &   a^3 &     e \end{array}$

Coset Decomposition of $\set {e, a^2}$
Presenting the above Cayley table with respect to the coset decomposition of the normal subgroup $\gen a^2$ gives:

Coset Decomposition of $\set {e, a, a^2, a^3}$
Presenting the above Cayley table with respect to the coset decomposition of the normal subgroup $\gen a$ gives: