Closure under matrix multiplication for 2x2 matrices

Call matrices of this $\begin{pmatrix}*&0\\0&*\end{pmatrix}$ form "diagonal" and matrices of this $\begin{pmatrix}0&*\\*&0\end{pmatrix}$ form "skew diagonal". First prove that the product of diagonal matrices is diagonal, the product of diagonal and skew diagonal is skew diagonal, the product of skew diagonal and diagonal is skew diagonal and that the product of skew diagonal and skew diagonal is diagonal.

Then prove that every entry in the resulting matrices will always be $\pm 1$. Finally note that every matrix which is diagonal or skew diagonal and has entries in $\{\pm 1\}$ is one of your eight.


The matrices $A = \begin{bmatrix}1&0\\0&-1\end{bmatrix}$ and $B = \begin{bmatrix}0&1\\1&0\end{bmatrix}$ satisfy the identities $BB=I$, $AA = I$, $AB=-BA.$ Consider the group of all possible matrix products of $A$s and $B$s, consider any element of it. The last identity allows you to reorder any matrix multiplication of these two into the form $\pm A\dots AB\dots B$ and the first two identities allow you to remove As and Bs from it two-at-a-time, so the group has at most 8 elements, $$\{I, A, B, AB, -I, -A, -B, -AB\}.$$ By inspection, these are the 8 that you have and none of them is secretly equal to another of them, so the group has order 8.


Here's a second way to do it which might be quicker. Define $G$ to be the group of the $2\times 2$ invertible matrices which fix the set $\{(0,1),(1,0),(0,-1),(-1,0)\}$. It's easy to prove this is a group and also easy to check that it contains precisely your eight matrices.