# Commuting matrices

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Commuting_matrices
> Markdown URL: https://mediated.wiki/source/Commuting_matrices.md
> Source: https://en.wikipedia.org/wiki/Commuting_matrices
> Source revision: 1353283714
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Mathematical concept in algebra

In [linear algebra](/source/Linear_algebra), two [matrices](/source/Matrix_(mathematics)) A {\displaystyle A} and B {\displaystyle B} are said to **commute** if A B = B A {\displaystyle AB=BA} , or equivalently if their [commutator](/source/Commutator) [ A , B ] = A B − B A {\displaystyle [A,B]=AB-BA} is zero. Matrices A {\displaystyle A} that commute with matrix B {\displaystyle B} are called the **commutant** of matrix B {\displaystyle B} (and vice versa).[1]

A [set](/source/Set_(mathematics)) of matrices A 1 , … , A k {\displaystyle A_{1},\ldots ,A_{k}} is said to **commute** if they commute pairwise, meaning that every pair of matrices in the set commutes.

## Characterizations and properties

- Commuting matrices preserve each other's [eigenspaces](/source/Eigenspace).[2] As a consequence, commuting matrices over an [algebraically closed field](/source/Algebraically_closed_field) are [simultaneously triangularizable](/source/Simultaneously_triangularizable); that is, there are [bases](/source/Basis_(linear_algebra)) over which they are both [upper triangular](/source/Upper_triangular_matrix). In other words, if A 1 , … , A k {\displaystyle A_{1},\ldots ,A_{k}} commute, there exists a similarity matrix P {\displaystyle P} such that P − 1 A i P {\displaystyle P^{-1}A_{i}P} is upper triangular for all i ∈ { 1 , … , k } {\displaystyle i\in \{1,\ldots ,k\}} . The [converse](/source/Converse_(logic)) is not necessarily true, as the following counterexample shows: - [ 1 2 0 3 ] [ 1 1 0 1 ] = [ 1 3 0 3 ] ≠ [ 1 5 0 3 ] = [ 1 1 0 1 ] [ 1 2 0 3 ] . {\displaystyle {\begin{bmatrix}1&2\\0&3\end{bmatrix}}{\begin{bmatrix}1&1\\0&1\end{bmatrix}}={\begin{bmatrix}1&3\\0&3\end{bmatrix}}\neq {\begin{bmatrix}1&5\\0&3\end{bmatrix}}={\begin{bmatrix}1&1\\0&1\end{bmatrix}}{\begin{bmatrix}1&2\\0&3\end{bmatrix}}.}

- Let n {\displaystyle n} be either 2 or 3, and let A {\displaystyle A} and B {\displaystyle B} be n {\displaystyle n} by n {\displaystyle n} matrices over an algebraically closed field. If the square of the commutator of A {\displaystyle A} and B {\displaystyle B} is 0 {\displaystyle 0} , that is, [ A , B ] 2 = 0 {\displaystyle [A,B]^{2}=0} , then A {\displaystyle A} and B {\displaystyle B} are simultaneously triangularizable.[3]

- Two diagonalizable matrices A {\displaystyle A} and B {\displaystyle B} commute ( A B = B A {\displaystyle AB=BA} ) if they are [simultaneously diagonalizable](/source/Simultaneously_diagonalizable) (that is, there exists an [invertible matrix](/source/Invertible_matrix) P {\displaystyle P} such that both P − 1 A P {\displaystyle P^{-1}AP} and P − 1 B P {\displaystyle P^{-1}BP} are [diagonal](/source/Diagonal_matrix)).[4]: p. 64 The converse is also true; that is, if two diagonalizable matrices commute, they are simultaneously diagonalizable.[5] But if you take any two matrices that commute (and do not assume they are two diagonalizable matrices) they are simultaneously diagonalizable already if one of the matrices has no multiple eigenvalues.[6]

- If A {\displaystyle A} and B {\displaystyle B} commute, they have a common eigenvector. If A {\displaystyle A} has distinct eigenvalues, and A {\displaystyle A} and B {\displaystyle B} commute, then A {\displaystyle A} 's eigenvectors are B {\displaystyle B} 's eigenvectors.

- If one of the matrices has the property that its minimal polynomial coincides with its [characteristic polynomial](/source/Characteristic_polynomial) (that is, it has the maximal degree), which happens in particular whenever the characteristic polynomial has only [simple roots](/source/Multiplicity_(mathematics)#Multiplicity_of_a_root_of_a_polynomial), then the other matrix can be written as a polynomial in the first.

- As a direct consequence of simultaneous triangulizability, the [eigenvalues](/source/Eigenvalue) of two commuting [complex](/source/Complex_number) matrices *A*, *B* with their [algebraic multiplicities](/source/Algebraic_multiplicity) (the [multisets](/source/Multiset) of roots of their characteristic polynomials) can be matched up as α i ↔ β i {\displaystyle \alpha _{i}\leftrightarrow \beta _{i}} in such a way that the multiset of eigenvalues of any polynomial P ( A , B ) {\displaystyle P(A,B)} in the two matrices is the multiset of the values P ( α i , β i ) {\displaystyle P(\alpha _{i},\beta _{i})} . This theorem is due to [Frobenius](/source/Ferdinand_Georg_Frobenius).[7]

- Two [Hermitian](/source/Hermitian_matrix) matrices commute if their [eigenspaces](/source/Eigenspace) coincide. In particular, two Hermitian matrices without multiple eigenvalues commute if they share the same set of eigenvectors. This follows by considering the eigenvalue decompositions of both matrices. Let A {\displaystyle A} and B {\displaystyle B} be two Hermitian matrices. A {\displaystyle A} and B {\displaystyle B} have common eigenspaces when they can be written as A = U Λ 1 U † {\displaystyle A=U\Lambda _{1}U^{\dagger }} and B = U Λ 2 U † {\displaystyle B=U\Lambda _{2}U^{\dagger }} . It then follows that - A B = U Λ 1 U † U Λ 2 U † = U Λ 1 Λ 2 U † = U Λ 2 Λ 1 U † = U Λ 2 U † U Λ 1 U † = B A . {\displaystyle AB=U\Lambda _{1}U^{\dagger }U\Lambda _{2}U^{\dagger }=U\Lambda _{1}\Lambda _{2}U^{\dagger }=U\Lambda _{2}\Lambda _{1}U^{\dagger }=U\Lambda _{2}U^{\dagger }U\Lambda _{1}U^{\dagger }=BA.}

- The property of two matrices commuting is not [transitive](/source/Transitive_relation): A matrix A {\displaystyle A} may commute with both B {\displaystyle B} and C {\displaystyle C} , and still B {\displaystyle B} and C {\displaystyle C} do not commute with each other. As an example, the [identity matrix](/source/Identity_matrix) commutes with all matrices, which between them do not all commute. If the set of matrices considered is restricted to Hermitian matrices without multiple eigenvalues, then commutativity is transitive, as a consequence of the characterization in terms of eigenvectors.

- [Lie's theorem](/source/Lie's_theorem), which shows that any [representation](/source/Lie_algebra_representation) of a [solvable Lie algebra](/source/Solvable_Lie_algebra) is simultaneously upper triangularizable, may be viewed as a generalization.

- An *n* × *n* matrix A {\displaystyle A} commutes with every other *n* × *n* matrix if and only if it is a scalar matrix, that is, a matrix of the form λ I {\displaystyle \lambda I} , where I {\displaystyle I} is the *n* × *n* identity matrix and λ {\displaystyle \lambda } is a scalar. In other words, the [center](/source/Center_(group_theory)) of the [group](/source/Group_(mathematics)) of invertible *n* × *n* matrices under multiplication is the [subgroup](/source/Subgroup) of scalar matrices.

- Fix a [finite field](/source/Finite_field) F q {\displaystyle \mathbb {F} _{q}} , let P ( n ) {\displaystyle P(n)} denote the number of ordered pairs of commuting n × n {\displaystyle n\times n} matrices over F q {\displaystyle \mathbb {F} _{q}} , [W. Feit](/source/Walter_Feit) and N. J. Fine[8] showed the equation 1 + ∑ n = 1 ∞ P ( n ) ( q n − 1 ) ( q n − q ) ⋯ ( q n − q n − 1 ) z n = ∏ i = 1 ∞ ∏ j = 0 ∞ 1 1 − q 1 − j z i . {\displaystyle 1+\sum _{n=1}^{\infty }{\frac {P(n)}{(q^{n}-1)(q^{n}-q)\cdots (q^{n}-q^{n-1})}}z^{n}=\prod _{i=1}^{\infty }\prod _{j=0}^{\infty }{\frac {1}{1-q^{1-j}z^{i}}}.}

## Examples

- The identity matrix commutes with all matrices.

- [Jordan blocks](/source/Jordan_block) commute with upper triangular matrices that have the same value along bands.

- If the product of two [symmetric matrices](/source/Symmetric_matrix) is symmetric, then they must commute. That also means that every diagonal matrix commutes with all other diagonal matrices.[9][10]

- [Circulant matrices](/source/Circulant_matrices) commute. They form a [commutative ring](/source/Commutative_ring) since the sum of two circulant matrices is circulant.

## History

The notion of commuting matrices was introduced by [Cayley](/source/Arthur_Cayley) in his memoir on the theory of matrices, which also provided the first axiomatization of matrices. The first significant results on commuting matrices were proved by [Frobenius](/source/Ferdinand_Georg_Frobenius) in 1878.[11] In 1969, Gelfand and Ponomarev showed that the problem of classification of pairs of commuting matrices is equivalent to the problem of classification on k-tuples of matrices modulo similarity, which does not have a reasonable solution.[12]

## References

1. **[^](#cite_ref-1)** Godsil, Christopher and Meagher, Karen. [Erdõs-Ko-Rado Theorems: Algebraic Approaches](https://books.google.com/books?id=P0XjCgAAQBAJ&pg=PA51), p. 51 (Cambridge University Press 2016).

1. **[^](#cite_ref-2)** Horn, Roger A.; Johnson, Charles R. (2012). *Matrix Analysis*. Cambridge University Press. p. 70. [ISBN](/source/ISBN_(identifier)) [9780521839402](https://en.wikipedia.org/wiki/Special:BookSources/9780521839402).

1. **[^](#cite_ref-3)** Horn, Roger A.; Johnson, Charles R. (2012). *Matrix Analysis*. Cambridge University Press. p. 127. [ISBN](/source/ISBN_(identifier)) [9780521839402](https://en.wikipedia.org/wiki/Special:BookSources/9780521839402).

1. **[^](#cite_ref-HornJohnson_4-0)** Horn, Roger A.; Johnson, Charles R. (2013). *Matrix Analysis, second edition*. Cambridge University Press. [ISBN](/source/ISBN_(identifier)) [9780521839402](https://en.wikipedia.org/wiki/Special:BookSources/9780521839402).

1. **[^](#cite_ref-5)** [Without loss of generality](/source/Without_loss_of_generality), one may suppose that the first matrix A = ( a i , j ) {\displaystyle A=(a_{i,j})} is diagonal. In this case, commutativity implies that if an entry b i , j {\displaystyle b_{i,j}} of the second matrix is nonzero, then a i , i = a j , j . {\displaystyle a_{i,i}=a_{j,j}.} After a permutation of rows and columns, the two matrices become simultaneously [block diagonal](/source/Block_diagonal). In each block, the first matrix is the product of an identity matrix, and the second one is a diagonalizable matrix. So, diagonalizing the blocks of the second matrix does change the first matrix, and allows a simultaneous diagonalization.

1. **[^](#cite_ref-6)** ["Proofs Homework Set 10 MATH 217 — WINTER 2011"](http://www.math.lsa.umich.edu/~tfylam/Math217/proofs10-sol.pdf) (PDF). Retrieved 10 July 2022.

1. **[^](#cite_ref-7)** Frobenius, G. (1877). "Ueber lineare Substitutionen und bilineare Formen". *Journal für die reine und angewandte Mathematik*. **84**: 1–63.

1. **[^](#cite_ref-8)** Feit, Walter; Fine, N. J. (1960-03-01). ["Pairs of commuting matrices over a finite field"](https://dx.doi.org/10.1215/s0012-7094-60-02709-5). *Duke Mathematical Journal*. **27** (1). [doi](/source/Doi_(identifier)):[10.1215/s0012-7094-60-02709-5](https://doi.org/10.1215%2Fs0012-7094-60-02709-5). [ISSN](/source/ISSN_(identifier)) [0012-7094](https://search.worldcat.org/issn/0012-7094).

1. **[^](#cite_ref-9)** ["Do Diagonal Matrices Always Commute?"](https://math.stackexchange.com/q/1697991). Stack Exchange. March 15, 2016. Retrieved August 4, 2018.

1. **[^](#cite_ref-10)** ["Linear Algebra WebNotes part 2"](https://math.vanderbilt.edu/sapirmv/msapir/jan22.html). *math.vanderbilt.edu*. Retrieved 2022-07-10.

1. **[^](#cite_ref-11)** Drazin, M. (1951), "Some Generalizations of Matrix Commutativity", *Proceedings of the London Mathematical Society*, 3, **1** (1): 222–231, [doi](/source/Doi_(identifier)):[10.1112/plms/s3-1.1.222](https://doi.org/10.1112%2Fplms%2Fs3-1.1.222)

1. **[^](#cite_ref-12)** Gelfand, I.; Ponomarev, V. (1969), "Remarks on the classification of a pair of commuting linear transformations in a finite-dimensional space (Russian)", *Funk. Anal. Appl.*, **1** (4): 81-82.

---
Adapted from the Wikipedia article [Commuting matrices](https://en.wikipedia.org/wiki/Commuting_matrices) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Commuting_matrices?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
