# What causes commutativity of matrices?

My understanding is that the multiplication of two matrices is NOT commutative most of the time.

One exception is two matrices, A and B, that are inverses of the other. This condition leads in turn, to some important restrictions.

1. The two matrices are square matrices of the same dimension.
2. One equals the transpose of the other, divided by their (common) determinant, to "unitize" the inverse matrix.
3. They are "nonsingular" insofar as their determinant is non-zero (can't divide by zero in 2, above).

What causes such matrices to be commutative under multiplication? Is invertibility a necessary and/or sufficient condition for two matrices to be commutative in this way?

In this post, there was an answer that the required condition was "a common basis of generalized eigenvectors." How does that allow commutativity between the two matrices? Is is because they are "bijective" (injective and surjective)?

• Well, for $(3)$, note that $0_{n\times n}$ commutes with every $n\times n$ matrix, including singular matrices. – Namaste Jul 13 '14 at 14:26
• More generally, the fact that $X^{-1}$ commutes with $X$ is simply the extension into negative exponents of the observation that $X^n, X^m$ are commuting matrices for any $X$ a square matrix and $n,m$ integers. – JHance Jul 13 '14 at 14:35
• @amWhy: OK, I guess invertibility is not necessary for commutativity. – Tom Au Jul 13 '14 at 14:37

A partial answer is that for an $n\times n$ matrix, $A$, things that commute with $A$ include $I$ (the $n\times n$ identity matrix), $A, A^2,..., A^{n-1}$, and linear combinations of these matrices. Also, because $A$ satisfies its characteristic equation, $A^n$ can be written as a linear combination of lower powers of $A$ (and $I$).
• Yes. Polynomials in $A$ commute with $A$. And all polynomials in $A$ can be written in terms of $I$, and powers of $A$ through $A^{n-1}$. – paw88789 Jul 27 '16 at 12:07