If there are two matrices A and B that are both nxn matrices, will AB = BA always?
Is there a way to have those two matrices so that AB = 0 but BA ≠ 0?
If there are two matrices A and B that are both nxn matrices, will AB = BA always?
Is there a way to have those two matrices so that AB = 0 but BA ≠ 0?
It is false. Take $2 \times 2$ matrices and: $$A = \begin{pmatrix} 1 & 1 \\ 0 & 0\end{pmatrix} \quad \mbox{and} \quad B = \begin{pmatrix} 0 & 0 \\ 1 & 1\end{pmatrix}.$$ This way we have: $$AB = \begin{pmatrix} 1 & 1 \\ 0 & 0\end{pmatrix} \quad \mbox{and} \quad BA = \begin{pmatrix} 0 & 0 \\ 1 & 1 \end{pmatrix}.$$
You want two matrices $A,B \in M(n\times n;K)$ such that $AB=0$ and $BA\neq 0$. Define
$$A= \begin{pmatrix}1 &1\\0&0\end{pmatrix},\quad B=\begin{pmatrix}-1&0\\1&0\end{pmatrix}$$
two matrices in $M(2\times 2; \Bbb{R})$ You can see that
$$AB = \begin{pmatrix}0&0\\0&0\end{pmatrix}$$
while
$$BA = \begin{pmatrix}-1&-1\\1&1\end{pmatrix}$$
As you can see matrix multiplication is not commutative.
No. I can give a simple counterexample:
$\begin{pmatrix}1 & 2 \\ 3 &4\end{pmatrix}$ * $\begin{pmatrix}4 & 3\\2 & 1\end{pmatrix}$ = $\begin{pmatrix}8 & 5\\20 & 13\end{pmatrix}$
while
$\begin{pmatrix}4 & 3\\2 & 1\end{pmatrix}$ * $\begin{pmatrix}1 & 2\\3&4\end{pmatrix}$ = $\begin{pmatrix}16 & 20\\8 & 8\end{pmatrix}$.
Two matrices are rarely commutative. Even square ones.
Check this question here for more on commutativity with matrices.