TOPICS
Search

Commuting Matrices


Commuting matrices are two matrices A and B that satisfy

 AB=BA
(1)

under matrix multiplication.

In general, matrix multiplication is not commutative. Furthermore, a nonzero square matrix need not have a matrix inverse: A^(-1) exists exactly when det(A)!=0, where det is the determinant. Finally, AB can be zero even without A=0 or B=0. Moreover, when AB=0, we may still have BA!=0, a simple example of which is provided by

A=[0 1; 0 0]
(2)
B=[1 0; 0 0]
(3)

for which

 AB=0,
(4)

but

 BA=[0 1; 0 0]=A.
(5)

(Taussky 1957).

For a noncommutative matrix ring, its commuting graph records commuting pairs outside its ring center.

Two commuting n×n matrices over a field K generate a unital subalgebra of dimension at most n (Gerstenhaber 1961). Lin (2026) reports the same bound for three pairwise commuting n×n matrices over any field. The bound is sharp for every n>=1. Take a nilpotent Jordan block J of size n and two copies of the zero matrix. The identity matrix and the positive powers J,...,J^(n-1) form a basis of the generated unital subalgebra, since those powers occupy distinct superdiagonals and J^n=0. Lin credits AI assistance in developing the proof. The Palomar Registry (2026) records verification of a Lean formalization for arbitrary fields.


See also

Commutative, Matrix Inverse, Matrix Multiplication

Portions of this entry contributed by Ronald M. Aarts

Explore with Wolfram|Alpha

References

Gantmacher, F. R. Ch. 8 in The Theory of Matrices, Vol. 1. Providence, RI: Amer. Math. Soc., 1998.Gerstenhaber, M. "On Dominance and Varieties of Commuting Matrices." Ann. Math. 73, 324-348, 1961. https://doi.org/10.2307/1970336.Lin, Y.-C. "A Solution to the Gerstenhaber Problem for Three Commuting Matrices." Hexagon, Nov. 25, 2026. https://hexagonmath.org/2611.01040v1.Palomar Registry. "The Gerstenhaber Dimension Bound for Three Commuting Matrices Over Arbitrary Fields." Entry PALOMAR-2026-11-21-000010, Nov. 21, 2026. https://palomar-registry.org/entry?id=PALOMAR-2026-11-21-000010&version=1.Taussky, O. "Commutativity in Finite Matrices." Amer. Math. Monthly 64, 229-235, 1957.

Referenced on Wolfram|Alpha

Commuting Matrices

Cite this as:

Weisstein, Eric W., with contributions by Ronald M. Aarts. "Commuting Matrices." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/CommutingMatrices.html

Subject classifications