Quaternion Group/Cayley Table

Cayley Table for Quaternion Group
The Cayley table for the quaternion group given with the group presentation:
 * $Q = \Dic 2 = \gen {a, b: a^4 = e, b^2 = a^2, a b a = b}$

can be presented as:


 * $\begin{array}{r|rrrrrrrr}

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