Answer: Is true sometimes.
Step-by-step explanation:
I guess that here we have two matrices, A and B, that are nxn.
We can see that if those matrices can conmutate, then we can try it with some simple matrices.
![A = \left[\begin{array}{ccc}1&0\\0&-1\end{array}\right] . B = \left[\begin{array}{ccc}2&0\\1&1\end{array}\right]](https://tex.z-dn.net/?f=A%20%3D%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7D1%260%5C%5C0%26-1%5Cend%7Barray%7D%5Cright%5D%20.%20B%20%3D%20%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7D2%260%5C%5C1%261%5Cend%7Barray%7D%5Cright%5D)
Here, we would have that:
![AB = \left[\begin{array}{ccc}2&0\\-1&-1\end{array}\right]](https://tex.z-dn.net/?f=AB%20%3D%20%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7D2%260%5C%5C-1%26-1%5Cend%7Barray%7D%5Cright%5D)
![BA = \left[\begin{array}{ccc}2&0\\1&-1\end{array}\right]](https://tex.z-dn.net/?f=BA%20%3D%20%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7D2%260%5C%5C1%26-1%5Cend%7Barray%7D%5Cright%5D)
You can see that AB and BA are different, then the statement is not always true.
But it is true sometimes, if A or B are the identiti, then I*A = A*I, in this case would be true.
It is also true if A and B are diagonal matrices, let's prove it:
![A = \left[\begin{array}{ccc}a&0\\0&b\end{array}\right] , B = \left[\begin{array}{ccc}c&0\\0&d\end{array}\right]](https://tex.z-dn.net/?f=A%20%3D%20%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7Da%260%5C%5C0%26b%5Cend%7Barray%7D%5Cright%5D%20%2C%20B%20%3D%20%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7Dc%260%5C%5C0%26d%5Cend%7Barray%7D%5Cright%5D)
![AB = \left[\begin{array}{ccc}ac&0\\0&bd\end{array}\right] = BA](https://tex.z-dn.net/?f=AB%20%3D%20%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7Dac%260%5C%5C0%26bd%5Cend%7Barray%7D%5Cright%5D%20%3D%20BA)