physics2u
Tier
⌕ Search ⌘K
Derivation

Simultaneous Diagonalization of Commuting Operators

D-084 Home PU-104 Threads symmetry · matter Depends on Spectral Theorem for Self-Adjoint Operators
Statement

Let \(\hat{A}\) and \(\hat{B}\) be self-adjoint operators on a finite-dimensional complex inner-product space \(V\), \(\dim V = n\), and suppose they commute, \([\hat{A},\hat{B}] = \hat{A}\hat{B} - \hat{B}\hat{A} = 0\). Then \(V\) possesses a single orthonormal basis \(\{\lvert e_1\rangle,\dots,\lvert e_n\rangle\}\) whose every vector is simultaneously an eigenvector of \(\hat{A}\) and of \(\hat{B}\), so that one unitary \(U\) brings both to diagonal form: \(U^{\dagger}\hat{A}U = \operatorname{diag}(a_1,\dots,a_n)\) and \(U^{\dagger}\hat{B}U = \operatorname{diag}(b_1,\dots,b_n)\). The converse also holds: two self-adjoint operators sharing an orthonormal eigenbasis necessarily commute.

Why it matters

This is the mathematical definition of compatible observables. In quantum mechanics a measurement projects a state onto an eigenvector; if two observables share an eigenbasis, a single state can have a definite value of both at once, and the two measurements can be performed in either order without disturbing each other. The theorem tells us precisely when that is possible: exactly when the operators commute.

It underwrites the entire bookkeeping of good quantum numbers and complete sets of commuting observables (CSCO). The reason the hydrogen atom's stationary states are labelled by \((n,\ell,m)\) is that \(\hat{H}\), \(\hat{L}^2\) and \(\hat{L}_z\) mutually commute and can be simultaneously diagonalized, so each eigenvector carries one label from each operator. Where operators fail to commute, no such joint labelling exists, and an uncertainty relation appears in its place.

Assumptions
Both operators are self-adjoint, \(\hat{A}^{\dagger}=\hat{A}\), \(\hat{B}^{\dagger}=\hat{B}\).Self-adjointness is what lets us invoke the spectral theorem for each factor and guarantees the block restrictions are again self-adjoint; drop it and commuting operators may fail to be diagonalizable at all (two commuting nilpotent Jordan blocks share only a defective, non-orthonormal structure). The operators commute, \([\hat{A},\hat{B}]=0\).Commutation is the single hypothesis that makes each \(\hat{A}\)-eigenspace invariant under \(\hat{B}\); without it \(\hat{B}\) mixes different \(\hat{A}\)-eigenspaces and no common eigenbasis can exist beyond accidental shared vectors. The space is finite-dimensional.In infinite dimensions commuting self-adjoint operators may have continuous spectra and no eigenvectors; the theorem is then replaced by a joint projection-valued measure (spectral commutation). The inner product is positive-definite, so the restriction of \(\hat{B}\) to each \(\hat{A}\)-eigenspace is self-adjoint with respect to the inherited metric.With an indefinite (Minkowski-type) metric the restricted operator need not be diagonalizable and the eigenspaces need not be mutually orthogonal, so the two inductions used below both fail.
Derivation
1
\[ V = \bigoplus_{a\in\sigma(\hat{A})} E_a,\qquad E_a = \ker(\hat{A}-a\hat{I}),\qquad E_a \perp E_{a'}\ (a\neq a') \]
Apply the spectral theorem for self-adjoint operators (spectral-theorem-self-adjoint) to \(\hat{A}\): \(V\) splits into an orthogonal direct sum of eigenspaces indexed by the distinct real eigenvalues \(a\). A
2
\[ \lvert v\rangle\in E_a \ \Rightarrow\ \hat{A}\bigl(\hat{B}\lvert v\rangle\bigr) = \hat{B}\bigl(\hat{A}\lvert v\rangle\bigr) = \hat{B}\,(a\lvert v\rangle) = a\,\bigl(\hat{B}\lvert v\rangle\bigr) \]
Push \(\hat{A}\) through \(\hat{B}\) using \([\hat{A},\hat{B}]=0\), then use \(\hat{A}\lvert v\rangle = a\lvert v\rangle\). This is the one place commutation is used. B
3
\[ \hat{B}\lvert v\rangle \in E_a \quad\text{for every } \lvert v\rangle\in E_a \ \Longrightarrow\ \hat{B}\,E_a \subseteq E_a \]
Step 2 shows \(\hat{B}\lvert v\rangle\) is again an \(\hat{A}\)-eigenvector with the same eigenvalue \(a\), so each eigenspace \(E_a\) is \(\hat{B}\)-invariant. A
4
\[ \langle \hat{B}u\,|\,w\rangle = \langle u\,|\,\hat{B}w\rangle \quad \forall\, u,w\in E_a,\qquad \hat{B}\big|_{E_a}: E_a\to E_a \ \text{self-adjoint} \]
The restriction \(\hat{B}\big|_{E_a}\) is well-defined by invariance (step 3); the inner product restricted to \(E_a\) stays positive-definite and the self-adjointness identity is inherited unchanged, so the restriction is a self-adjoint operator on the smaller space \(E_a\). C
5
\[ E_a = \bigoplus_{b} \bigl(E_a \cap F_b\bigr),\qquad \{\lvert e^{(a)}_1\rangle,\dots\}\ \text{orthonormal eigenbasis of } \hat{B}\big|_{E_a} \]
Apply the spectral theorem a second time, now to the self-adjoint operator \(\hat{B}\big|_{E_a}\) on \(E_a\): it has an orthonormal basis of \(\hat{B}\)-eigenvectors (\(F_b=\ker(\hat{B}-b\hat I)\)). C
6
\[ \hat{B}\lvert e^{(a)}_j\rangle = b\,\lvert e^{(a)}_j\rangle \quad\text{and}\quad \hat{A}\lvert e^{(a)}_j\rangle = a\,\lvert e^{(a)}_j\rangle \]
Each basis vector of \(E_a\) is a \(\hat{B}\)-eigenvector by construction, and lies in \(E_a\) so it is automatically an \(\hat{A}\)-eigenvector with eigenvalue \(a\): it is a joint eigenvector. A
7
\[ \{\lvert e_k\rangle\}_{k=1}^{n} \;=\; \bigcup_{a\in\sigma(\hat A)} \{\lvert e^{(a)}_j\rangle\},\qquad \langle e_k\,|\,e_\ell\rangle = \delta_{k\ell} \]
Collect the bases from all eigenspaces. Vectors within one \(E_a\) are orthonormal by step 5; vectors from different \(E_a, E_{a'}\) are orthogonal because those eigenspaces are orthogonal (step 1). The union is a full orthonormal basis of \(V\). B
8
\[ U \equiv \bigl[\,\lvert e_1\rangle\ \lvert e_2\rangle\ \cdots\ \lvert e_n\rangle\,\bigr],\qquad U^{\dagger}U = I \]
Stack the common orthonormal eigenvectors as columns; orthonormality is exactly the unitarity condition \(U^\dagger U=I\). A
9
\[ (U^{\dagger}\hat{A}U)_{k\ell} = a_\ell\,\delta_{k\ell},\qquad (U^{\dagger}\hat{B}U)_{k\ell} = b_\ell\,\delta_{k\ell} \]
Act with \(\hat A\) and \(\hat B\) on each eigen-column and use orthonormality; both transformed matrices are diagonal, with the entries being the joint eigenvalues \((a_\ell,b_\ell)\). B
10
\[ \hat{A}\hat{B}\lvert e_k\rangle = a_k b_k \lvert e_k\rangle = \hat{B}\hat{A}\lvert e_k\rangle \ \forall k \ \Longrightarrow\ [\hat{A},\hat{B}]=0 \quad(\text{converse}) \]
Conversely, if a common eigenbasis exists, both products act as multiplication by \(a_k b_k\) on every basis vector; agreeing on a basis forces \(\hat A\hat B = \hat B\hat A\). Commutation and simultaneous diagonalizability are equivalent. C
Result
\[ [\hat{A},\hat{B}]=0 \iff \exists\,U\ \text{unitary}:\ U^{\dagger}\hat{A}U = \operatorname{diag}(a_k),\ \ U^{\dagger}\hat{B}U = \operatorname{diag}(b_k) \]

Reading. Commuting self-adjoint operators are two lists of real numbers attached to one shared set of orthogonal directions: the direction \(\lvert e_k\rangle\) is stretched by \(a_k\) under \(\hat{A}\) and by \(b_k\) under \(\hat{B}\). Each common eigenvector carries a joint eigenvalue label \((a_k,b_k)\) — the mathematical origin of a state's simultaneous quantum numbers. When one operator's spectrum is degenerate, the other operator's eigenvalue distinguishes the vectors inside that degenerate block.

Units check. \(U\) is built from normalized, dimensionless states and is itself dimensionless, so \(U^{\dagger}\hat{A}U\) carries the units of \(\hat{A}\) and \(U^{\dagger}\hat{B}U\) the units of \(\hat{B}\). Each eigenvalue \(a_k\) inherits the physical dimension of the observable \(\hat{A}\) (e.g. energy) and each \(b_k\) that of \(\hat{B}\) (e.g. \(\hbar^2\) for \(\hat{L}^2\)); the two lists need not share units. The commutator \([\hat{A},\hat{B}]\) carries units \([\hat{A}][\hat{B}]\), and its vanishing is dimensionally consistent on both sides.

Limiting cases
  • \(\hat{A}\) non-degenerate (all \(a_k\) distinct): every \(E_a\) is one-dimensional, so step 5 is trivial and each \(\hat{A}\)-eigenvector is automatically a \(\hat{B}\)-eigenvector. \(\hat{A}\) alone forms a CSCO and the common basis is unique up to phases.
  • \(\hat{A}=c\hat{I}\) (a multiple of the identity): every vector lies in one eigenspace, \(\hat{A}\) imposes no constraint, and the common basis is whatever diagonalizes \(\hat{B}\) alone.
  • \(\hat{B}=f(\hat{A})\) (a function of \(\hat{A}\)): the two automatically commute and share \(\hat{A}\)'s eigenbasis, with \(b_k=f(a_k)\). This is the tightest possible dependence.
  • Both already diagonal in the working basis: \(U=I\), and the joint eigenvalues are read straight off the two diagonals.
Breaks when
  • The operators do not commute, \([\hat{A},\hat{B}]\neq 0\). Step 2 collapses: \(\hat{B}\) maps some \(\hat{A}\)-eigenvector out of its eigenspace, so no complete common eigenbasis exists. For \(\hat{\sigma}_x\) and \(\hat{\sigma}_z\) (which anticommute) there is not a single shared eigenvector, and the position–momentum pair \([\hat{x},\hat{p}]=i\hbar\) has none at all — the Robertson uncertainty relation replaces simultaneous diagonalization.
  • Non-self-adjoint (non-normal) operators. Commuting matrices always share at least one eigenvector over \(\mathbb{C}\), but if either is defective there is no eigenbasis to share. Two commuting nilpotent Jordan blocks are simultaneously triangularizable but not diagonalizable, and any shared eigenvectors are not orthonormal.
  • Infinite dimensions with continuous spectrum. Commuting operators such as the free-particle \(\hat{H}=\hat{p}^2/2m\) and \(\hat{p}\) have no normalizable eigenvectors; the plane waves \(e^{ikx}\notin L^2(\mathbb{R})\). "Simultaneous diagonalization" must be reinterpreted as a joint projection-valued measure over the continuous joint spectrum.
Failure modes
  • Believing degeneracy needs no extra work. When \(\hat{A}\) has a repeated eigenvalue, an arbitrary orthonormal basis of \(E_a\) is generally not a \(\hat{B}\)-eigenbasis; you must still diagonalize \(\hat{B}\) inside each degenerate block (step 5). Skipping this leaves \(\hat{B}\) block-diagonal but not diagonal.
  • Confusing "share one eigenvector" with "simultaneously diagonalizable". Non-commuting operators can accidentally share a single eigenvector; that does not give a full common basis. The theorem asserts a complete shared basis, which requires commutation.
  • Thinking \(\hat{B}\) may act freely on a degenerate \(\hat{A}\)-eigenspace. Commutation forces \(\hat{B}\) to be block-diagonal — it must map \(E_a\) into itself. Writing down a \(\hat{B}\) with cross-block entries silently violates \([\hat A,\hat B]=0\).
  • Assuming commuting operators are equal or proportional. Commutation is far weaker than equality; \(\hat{L}^2\) and \(\hat{L}_z\) commute yet are entirely different operators with different spectra.
  • Using the real dot product on complex eigenvectors. Normalizing and checking orthogonality with \(u^{T}v\) instead of the Hermitian \(u^{\dagger}v\) breaks \(U^\dagger U = I\), exactly as in the single-operator spectral theorem.
Discussion

The engine of the proof is a two-stage decoupling. The first spectral theorem breaks \(V\) into \(\hat{A}\)-eigenspaces; commutation guarantees \(\hat{B}\) respects that block structure; the second spectral theorem then diagonalizes \(\hat{B}\) inside each block. Physically, \(\hat{A}\) sorts states into bins by its own eigenvalue, and \(\hat{B}\) — because it cannot move a state between bins — can only rearrange states within a bin, where it too can be diagonalized. The result is a grid of joint eigenvalues \((a,b)\) labelling an orthonormal basis.

This is why quantum states carry several quantum numbers at once. A maximal set of mutually commuting observables — a CSCO — pins down each basis vector with a unique tuple of eigenvalues, with no remaining degeneracy. For the hydrogen atom \(\{\hat{H},\hat{L}^2,\hat{L}_z\}\) is such a set; each successive operator lifts the degeneracy left by the previous ones, exactly as \(\hat{B}\) splits a degenerate \(\hat{A}\)-block in the proof. When a symmetry produces degeneracy, one looks for an operator that commutes with the Hamiltonian to label the degenerate multiplet — the direct link between this theorem and the symmetry thread.

The converse (step 10) elevates the result to an equivalence: for self-adjoint (more generally normal) operators, commuting and being simultaneously diagonalizable are the same statement. This is the finite-dimensional heart of a deeper structural fact — a family of mutually commuting self-adjoint operators generates a commutative algebra whose common eigenbasis realizes its joint spectrum, the finite-dimensional shadow of the spectral theorem for commuting operators and of the Gelfand picture in which a commutative operator algebra is functions on a joint spectrum. It is also the precise statement dual to the uncertainty principle: the failure of two observables to be jointly diagonalizable is quantified by the size of their commutator through the Robertson relation.

Common misconceptions. Simultaneous diagonalizability does not require that each operator's eigenvectors are individually forced — only that some common orthonormal basis exists; when both are degenerate, that basis is highly non-unique. And commuting is not a loose statement that "measuring one never disturbs the other" — it is the sharp condition that a joint eigenbasis exists, which is what makes the order of the two measurements immaterial on those joint eigenstates.

Worked examples

Example 1 — a non-degenerate \(\hat{A}\) fixes the basis for \(\hat{B}\).

1
\[ \hat{A} = \begin{pmatrix}0&1\\1&0\end{pmatrix},\quad \hat{B} = \begin{pmatrix}2&1\\1&2\end{pmatrix} = 2\hat{I}+\hat{A} \]
Both are real symmetric (self-adjoint). Because \(\hat B\) is a polynomial in \(\hat A\), they commute. A
2
\[ \hat{A}\hat{B}=\begin{pmatrix}1&2\\2&1\end{pmatrix}=\hat{B}\hat{A}\ \Rightarrow\ [\hat{A},\hat{B}]=0 \]
Verify commutation explicitly before invoking the theorem. A
3
\[ \det(\hat{A}-a\hat I)=a^2-1=0 \Rightarrow a=\pm1;\quad \lvert e_1\rangle=\tfrac{1}{\sqrt2}\begin{pmatrix}1\\1\end{pmatrix},\ \lvert e_2\rangle=\tfrac{1}{\sqrt2}\begin{pmatrix}1\\-1\end{pmatrix} \]
Diagonalize the non-degenerate operator \(\hat A\); its eigenvectors are forced up to phase. B
4
\[ \hat{B}\lvert e_1\rangle = (2+1)\lvert e_1\rangle = 3\lvert e_1\rangle,\qquad \hat{B}\lvert e_2\rangle = (2-1)\lvert e_2\rangle = 1\lvert e_2\rangle \]
Since \(\hat B=2\hat I+\hat A\), the same vectors are automatically \(\hat B\)-eigenvectors with \(b=2+a\). B
\[ U=\tfrac{1}{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix},\quad U^{\dagger}\hat{A}U=\operatorname{diag}(1,-1),\quad U^{\dagger}\hat{B}U=\operatorname{diag}(3,1) \]

Reading. The joint eigenvalue labels are \((a,b)=(+1,3)\) and \((-1,1)\); one rotation into the \((1,\pm1)\) directions diagonalizes both operators at once.

Example 2 — a degenerate \(\hat{A}\) whose degeneracy is lifted by \(\hat{B}\).

1
\[ \hat{A}=\begin{pmatrix}1&0&0\\0&1&0\\0&0&2\end{pmatrix},\qquad \hat{B}=\begin{pmatrix}0&1&0\\1&0&0\\0&0&5\end{pmatrix} \]
Both self-adjoint; \(\hat A\) is scalar (\(=\hat I\)) on the \(xy\)-block and scalar on the \(z\)-slot, so it commutes with any block-diagonal \(\hat B\). A
2
\[ \sigma(\hat{A})=\{1,1,2\}:\quad E_1=\operatorname{span}\{\hat{x},\hat{y}\}\ (\text{degenerate}),\quad E_2=\operatorname{span}\{\hat{z}\} \]
\(\hat A\) alone cannot fix a basis inside the doubly-degenerate eigenspace \(E_1\). B
3
\[ \hat{B}\big|_{E_1}=\begin{pmatrix}0&1\\1&0\end{pmatrix}:\ b=\pm1,\quad \tfrac{1}{\sqrt2}(1,1,0)^{T}\ (b=1),\ \ \tfrac{1}{\sqrt2}(1,-1,0)^{T}\ (b=-1) \]
Diagonalize the self-adjoint restriction of \(\hat B\) to the invariant subspace \(E_1\); its two eigenvalues split the degeneracy. C
4
\[ \text{On } E_2:\ \hat{B}(0,0,1)^{T}=5\,(0,0,1)^{T}\ \Rightarrow\ (a,b)=(2,5) \]
The one-dimensional eigenspace \(E_2\) already gives a joint eigenvector. A
\[ U=\begin{pmatrix}\tfrac{1}{\sqrt2}&\tfrac{1}{\sqrt2}&0\\[2pt]\tfrac{1}{\sqrt2}&-\tfrac{1}{\sqrt2}&0\\[2pt]0&0&1\end{pmatrix},\ \ U^{\dagger}\hat{A}U=\operatorname{diag}(1,1,2),\ \ U^{\dagger}\hat{B}U=\operatorname{diag}(1,-1,5) \]

Reading. The joint labels \((1,1),(1,-1),(2,5)\) are all distinct even though \(\hat A\) alone repeats the value \(1\): \(\hat B\) supplies the second quantum number that resolves the degeneracy, so \(\{\hat A,\hat B\}\) is a CSCO.

Problems
  1. Prove the converse directly: if self-adjoint \(\hat{A},\hat{B}\) share an orthonormal eigenbasis \(\{\lvert k\rangle\}\), then \([\hat{A},\hat{B}]=0\).
    SolutionLet \(\hat{A}\lvert k\rangle=a_k\lvert k\rangle\) and \(\hat{B}\lvert k\rangle=b_k\lvert k\rangle\) for every basis vector. Then \(\hat{A}\hat{B}\lvert k\rangle=\hat{A}(b_k\lvert k\rangle)=a_k b_k\lvert k\rangle\), and \(\hat{B}\hat{A}\lvert k\rangle=b_k a_k\lvert k\rangle\). The operators \(\hat{A}\hat{B}\) and \(\hat{B}\hat{A}\) agree on every vector of a basis, hence are equal as linear maps, so \([\hat{A},\hat{B}]=\hat{A}\hat{B}-\hat{B}\hat{A}=0\).
  2. The matrices \(\hat{A}=\left(\begin{smallmatrix}3&1\\1&3\end{smallmatrix}\right)\) and \(\hat{B}=\left(\begin{smallmatrix}1&2\\2&1\end{smallmatrix}\right)\) commute. Find their common orthonormal eigenbasis and both diagonal forms, and list the joint eigenvalues.
    SolutionCheck: \(\hat{A}\hat{B}=\left(\begin{smallmatrix}5&7\\7&5\end{smallmatrix}\right)=\hat{B}\hat{A}\), so they commute. Both are of the form \(cI+d\,\hat\sigma_x\), so both are diagonalized by the \(\hat\sigma_x\) eigenvectors \(\lvert e_1\rangle=\tfrac1{\sqrt2}(1,1)^T\), \(\lvert e_2\rangle=\tfrac1{\sqrt2}(1,-1)^T\). Then \(\hat{A}\): \(a=3\pm1=\{4,2\}\); \(\hat{B}\): \(b=1\pm2=\{3,-1\}\). So \(U=\tfrac1{\sqrt2}\left(\begin{smallmatrix}1&1\\1&-1\end{smallmatrix}\right)\), \(U^{\dagger}\hat{A}U=\operatorname{diag}(4,2)\), \(U^{\dagger}\hat{B}U=\operatorname{diag}(3,-1)\). Joint eigenvalues \((4,3)\) and \((2,-1)\).
  3. For \(\hat{A}=\operatorname{diag}(2,2,5)\) and \(\hat{B}=\left(\begin{smallmatrix}3&1&0\\1&3&0\\0&0&7\end{smallmatrix}\right)\), verify they commute and construct a common orthonormal eigenbasis, showing that \(\hat{B}\) lifts the degeneracy of \(\hat{A}\).
    Solution\(\hat{A}\) is scalar (\(=2I\)) on the top-left \(2\times2\) block and \(5\) on the last slot, both scalars, so it commutes with the block-diagonal \(\hat{B}\); explicitly \(\hat{A}\hat{B}=\hat{B}\hat{A}\) block by block. The degenerate space is \(E_2=\operatorname{span}\{\hat x,\hat y\}\) (\(a=2\)). Restrict \(\hat{B}\) there: \(\left(\begin{smallmatrix}3&1\\1&3\end{smallmatrix}\right)\) has eigenvalues \(4,2\) with eigenvectors \(\tfrac1{\sqrt2}(1,1,0)^T\) and \(\tfrac1{\sqrt2}(1,-1,0)^T\). The slot \(a=5\) gives \((0,0,1)^T\) with \(b=7\). Common basis \(\{\tfrac1{\sqrt2}(1,1,0),\tfrac1{\sqrt2}(1,-1,0),(0,0,1)\}\); joint eigenvalues \((2,4),(2,2),(5,7)\), all distinct — so \(\{\hat A,\hat B\}\) is a CSCO.
  4. Show that if \([\hat{A},\hat{B}]=0\) and \(\hat{A}\) has a non-degenerate spectrum, then every eigenvector of \(\hat{A}\) is automatically an eigenvector of \(\hat{B}\).
    SolutionLet \(\hat{A}\lvert v\rangle=a\lvert v\rangle\). By commutation, \(\hat{A}(\hat{B}\lvert v\rangle)=\hat{B}\hat{A}\lvert v\rangle=a(\hat{B}\lvert v\rangle)\), so \(\hat{B}\lvert v\rangle\in E_a\). Non-degeneracy means \(\dim E_a=1\), i.e. \(E_a=\operatorname{span}\{\lvert v\rangle\}\). Any vector of \(E_a\) is a scalar multiple of \(\lvert v\rangle\), so \(\hat{B}\lvert v\rangle=b\lvert v\rangle\) for some scalar \(b\): \(\lvert v\rangle\) is a \(\hat{B}\)-eigenvector. This is why a single non-degenerate operator already forms a CSCO.
  5. Demonstrate the failure of the theorem when the operators do not commute: show that the Pauli matrices \(\hat{\sigma}_x=\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)\) and \(\hat{\sigma}_z=\left(\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\right)\) share no common eigenvector, and connect this to their commutator.
    SolutionThe eigenvectors of \(\hat{\sigma}_z\) are \((1,0)^T\) and \((0,1)^T\) (eigenvalues \(+1,-1\)). The eigenvectors of \(\hat{\sigma}_x\) are \(\tfrac1{\sqrt2}(1,1)^T\) and \(\tfrac1{\sqrt2}(1,-1)^T\) (eigenvalues \(+1,-1\)). No vector appears in both lists (up to scalar), so there is no common eigenvector, let alone a common basis. Consistently, \([\hat{\sigma}_x,\hat{\sigma}_z]=\hat{\sigma}_x\hat{\sigma}_z-\hat{\sigma}_z\hat{\sigma}_x=\left(\begin{smallmatrix}-1&0\\0&1\end{smallmatrix}\right)-\left(\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\right)=\left(\begin{smallmatrix}-2&0\\0&2\end{smallmatrix}\right)=-2i\,\hat{\sigma}_y\neq0\). A non-vanishing commutator forbids simultaneous diagonalization and forces the spin-\(x\)/spin-\(z\) uncertainty relation.