# When are multiplication on matrices commutative?

1. According to me multiplication on matrices are commutative only when (i) The given matrices are equal (ii) When the matrices are diagonal matrices and of same order. (iii) When a suitable identity matrix is being used as prefactor or postfactor

Are there any other possibilities when multiplication of matrices commutative?

2.If there is a matrix A and if assume $$A^m$$ is equal to B then

$$A^n*A=B=A*A^n$$ How is this possible?Is there any proof for it? What logic is being used here?

Yes, there are several other ways for matrices to commute, e.g., sitting in a proper upper-right corner of $$M_n(K)$$. By a theorem of Jacobson, the maximal dimension of a commutative subalgebra in $$M_n(K)$$ is given by $$[n^2/4]$$. There the maximal commutative subalgebras are also described explicitly. There are several posts here at MSE on this topic, e.g. this one:
Can any complex $n\times n$ matrix be in a maximal commuting set of $\lfloor n^2/4\rfloor + 1$ matrices?
1. There many possibilites. For instance any two matrices of the form $$\left[\begin{smallmatrix}r\cos\theta&-r\sin\theta\\r\sin\theta&r\cos\theta\end{smallmatrix}\right]$$ commute.
2. Because bith of them are equal to$$\overbrace{A\times A\times\cdots\times A}^{n+1\text{ times}}.$$
An easy way to create a lot of commuting pairs of matrices is to take a square matrix $$M$$, and two polynomials $$f$$ and $$g$$ with coefficients in your field. Then $$A=f(M)$$ and $$B=g(M)$$ satisfy $$AB=BA$$.