If $A^2 = I$ (Identity Matrix) then $A = \pm I$

A simple counterexample is $$A = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} $$ We have $A \neq \pm I$, but $A^{2} = I$.


In dimension $\geq 2$ take the matrix that exchanges two basis vectors ("a transposition")


I know $2·\mathbb C^2$ many counterexamples, namely

$$A=c_1\begin{pmatrix} 0&1\\ 1&0 \end{pmatrix}+c_2\begin{pmatrix} 1&0\\ 0&-1 \end{pmatrix}\pm\sqrt{c_1^2+c_2^2\pm1}\begin{pmatrix} 0&-1\\ 1&0 \end{pmatrix},$$

see Pauli Matrices $\sigma_i$.

These are all such matrices and can be written as $A=\vec e· \vec \sigma$, where $\vec e^2=\pm1$.