---
tag: 0FK17N4DKA
kind: statement
role: theorem
name: Simultaneous diagonalisation
msc: [15A20, 15A27]
uses: [0Y17PEKF24]
sources:
  - url: https://en.wikipedia.org/wiki/Diagonalizable_matrix
    locator: Simultaneous diagonalization
---

## Statement

Let $F$ be a field and let $A$ and $B$ be [[diagonalisable|07SQCNV233]] $n \times n$ matrices over $F$.
Then there is one invertible $n \times n$ matrix $P$ such that both $P^{-1} A P$ and $P^{-1} B P$ are diagonal if and only if $AB = BA$.

## Remarks

Diagonal matrices commute, so the condition $AB = BA$ is necessary.
For sufficiency, $B$ maps each eigenspace of $A$ to itself, and it is diagonalisable on each of them.
The same holds for each family of pairwise commuting diagonalisable matrices.

## Explanations

### L1 human

Two diagonalisable matrices can be diagonalised by the same change of basis exactly when they commute.
Then they share a basis of eigenvectors.
This fact is important in quantum mechanics, where commuting observables can be measured together.
