If $A=\left[\begin{array}{cc}0 & -x \\ x & 0\end{array}\right], B=\left[\begin{array}{ll}0 & 1 \\ 1 & 0\end{array}\right]$ and $x^{2}=-1$, then show that $(A+B)^{2}=A^{2}+B^{2}$.
Given: $A=\left[\begin{array}{cc}0 & -x \\ x & 0\end{array}\right], B=\left[\begin{array}{ll}0 & 1 \\ 1 & 0\end{array}\right]$ and $x^{2}=-1$
To show: $(A+B)^{2}=A^{2}+B^{2}$
LHS:
$A+B=\left[\begin{array}{cc}0 & -x \\ x & 0\end{array}\right]+\left[\begin{array}{ll}0 & 1 \\ 1 & 0\end{array}\right]$
$=\left[\begin{array}{cc}0+0 & -x+1 \\ x+1 & 0+0\end{array}\right]$
$=\left[\begin{array}{cc}0 & -x+1 \\ x+1 & 0\end{array}\right]$
$(A+B)^{2}=\left[\begin{array}{cc}0 & -x+1 \\ x+1 & 0\end{array}\right]\left[\begin{array}{cc}0 & -x+1 \\ x+1 & 0\end{array}\right]$
$=\left[\begin{array}{cc}0+(1-x)(1+x) & 0+0 \\ 0+0 & (x+1)(1-x)+0\end{array}\right]$
$=\left[\begin{array}{cc}1-x^{2} & 0 \\ 0 & 1-x^{2}\end{array}\right]$ ...(1)
RHS:
$A=\left[\begin{array}{cc}0 & -x \\ x & 0\end{array}\right]$
$A^{2}=\left[\begin{array}{cc}0 & -x \\ x & 0\end{array}\right]\left[\begin{array}{cc}0 & -x \\ x & 0\end{array}\right]$
$=\left[\begin{array}{cc}0-x^{2} & 0+0 \\ 0+0 & -x^{2}+0\end{array}\right]$ ...(2)
$B=\left[\begin{array}{ll}0 & 1 \\ 1 & 0\end{array}\right]$
$B^{2}=\left[\begin{array}{ll}0 & 1 \\ 1 & 0\end{array}\right]\left[\begin{array}{ll}0 & 1 \\ 1 & 0\end{array}\right]$
$=\left[\begin{array}{ll}0+1 & 0+0 \\ 0+0 & 1+0\end{array}\right]$
$=\left[\begin{array}{ll}1 & 0 \\ 0 & 1\end{array}\right]$ ...(3)
Adding $(2)$ and $(3)$, we get
$A^{2}+B^{2}=\left[\begin{array}{cc}-x^{2} & 0 \\ 0 & -x^{2}\end{array}\right]+\left[\begin{array}{ll}1 & 0 \\ 0 & 1\end{array}\right]$
$=\left[\begin{array}{cc}1-x^{2} & 0 \\ 0 & 1-x^{2}\end{array}\right]$ ...(4)
Comparing (1) and (4), we get
$(A+B)^{2}=A^{2}+B^{2}$