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")