If $A=\left[\begin{array}{rrr}2 & -3 & -5 \\ -1 & 4 & 5 \\ 1 & -3 & -4\end{array}\right]$ and $B=\left[\begin{array}{rrr}2 & -2 & -4 \\ -1 & 3 & 4 \\ 1 & -2 & -3\end{array}\right]$, show that $A B=A$ and $B A=B$.
Given : $A B=\left[\begin{array}{ccc}2 & -3 & -5 \\ -1 & 4 & 5 \\ 1 & -3 & -4\end{array}\right]\left[\begin{array}{ccc}2 & -2 & -4 \\ -1 & 3 & 4 \\ 1 & -2 & -3\end{array}\right]$
$\Rightarrow A B=\left[\begin{array}{ccc}4+3-5 & -4-9+10 & -8-12+15 \\ -2-4+5 & 2+12-10 & 4+16-15 \\ 2+3-4 & -2-9+8 & -4-12+12\end{array}\right]$
$\Rightarrow A B=\left[\begin{array}{ccc}2 & -3 & -5 \\ -1 & 4 & 5 \\ 1 & -3 & -4\end{array}\right]$
$\Rightarrow A B=A$
$B A=\left[\begin{array}{ccc}2 & -2 & -4 \\ -1 & 3 & 4 \\ 1 & -2 & -3\end{array}\right]\left[\begin{array}{ccc}2 & -3 & -5 \\ -1 & 4 & 5 \\ 1 & -3 & -4\end{array}\right]$
$\Rightarrow B A=\left[\begin{array}{ccc}4+2-4 & -6-8+12 & -10-10+16 \\ -2-3+4 & 3+12-12 & 5+15-16 \\ 2+2-3 & -3-8+9 & -5-10+12\end{array}\right]$
$\Rightarrow B A=\left[\begin{array}{ccc}2 & -2 & -4 \\ -1 & 3 & 4 \\ 1 & -2 & -3\end{array}\right]$
$\Rightarrow B A=B$