Diagonalizable matrix (source code)

= Diagonalizable matrix
{title2=$A=PDP^{-1}$}
{wiki}

= Diagonalisable matrix
{synonym}

= Semisimple endomorphism
{synonym}

= Diagonalizable
{synonym}

= Diagonalisable endomorphism
{synonym}

= Diagonalizability
{synonym}

A finite-dimensional <linear operator> is diagonalizable over a specified <field> when it has an <eigenbasis>. Equivalently, its <matrix> $A$ admits
$$
A=PDP^{-1},\qquad D=\operatorname{diag}(\lambda_1,\ldots,\lambda_n),
$$
where $P$ is an <invertible matrix> whose columns are <eigenvectors>, and $D$ is a <diagonal matrix> of the corresponding <eigenvalues>. This <change of basis> reveals a <linear map> as independent one-dimensional scalings. The <matrix> may look coupled in the original coordinates, but each coordinate in the <eigenbasis> evolves on its own.

For the <symmetric matrix> $A=\left(\begin{smallmatrix}2&1\\1&2\end{smallmatrix}\right)$ computed in <eigenvector>, take
$$
P=\begin{pmatrix}1&1\\1&-1\end{pmatrix},\qquad P^{-1}=\frac12\begin{pmatrix}1&1\\1&-1\end{pmatrix},\qquad D=\begin{pmatrix}3&0\\0&1\end{pmatrix}.
$$
Then $AP=PD$, hence $P^{-1}AP=D$. The <orthonormal basis> version is $Q=P/\sqrt2$, an <orthogonal matrix> satisfying $Q^TAQ=D$. Every real <symmetric matrix> has an <orthonormal eigenbasis> by the <spectral theorem>; a general <diagonalizable matrix> need not have <orthogonal> <eigenvectors>.

The immediate payoff is repeated application: adjacent factors $P^{-1}P$ cancel, giving $A^n=PD^nP^{-1}$. In this example,
$$
A^n=\frac12\begin{pmatrix}3^n+1&3^n-1\\3^n-1&3^n+1\end{pmatrix},\qquad A^n\begin{pmatrix}1\\0\end{pmatrix}=\frac12\left(3^n\begin{pmatrix}1\\1\end{pmatrix}+\begin{pmatrix}1\\-1\end{pmatrix}\right).
$$
The component in $E_3$ grows while the component in $E_1$ stays fixed. After division by its <Euclidean norm>, this particular sequence approaches $(1,1)^T/\sqrt2$. This is the mechanism behind the <power method>; an initial <vector> entirely in $E_1$ would stay there and never find the <dominant eigenvalue> $3$.

\Image[/eigenvalue-iteration.png]
{title=Repeated maps: eigenvalue growth, alignment, and the exceptional starting direction}

Two different obstructions deserve comparison. The <planar rotation> $R$ in <eigenvector> is <diagonalizable> over $\mathbb C$ but not over $\mathbb R$, because its <eigenvalues> are $i$ and $-i$. By contrast, the <shear mapping>
$$
S=\begin{pmatrix}1&1\\0&1\end{pmatrix},\qquad (S-I)\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}y\\0\end{pmatrix}
$$
has only $\lambda=1$, of <algebraic multiplicity> two, and $E_1=\operatorname{span}\{(1,0)^T\}$, of <geometric multiplicity> one. There is no second independent <eigenvector>, even over $\mathbb C$. This is a <defective matrix>, already a two-dimensional <Jordan block>. Its powers are
$$
S^n=\begin{pmatrix}1&n\\0&1\end{pmatrix},\qquad S^n\begin{pmatrix}0\\1\end{pmatrix}=\begin{pmatrix}n\\1\end{pmatrix}.
$$
Thus even though both <eigenvalues> are one, repeated application can produce growth. <Eigenvalues> alone miss the coupling recorded by a <Jordan block>. A repeated <eigenvalue> is harmless when it has enough independent <eigenvectors>, as $I$ demonstrates. More generally, a <matrix> is <diagonalizable> exactly when its <characteristic polynomial> splits over the chosen <field> and every <eigenvalue> has equal <geometric multiplicity> and <algebraic multiplicity>. The proof outline is to join <bases> of the distinct <eigenspaces>; their <direct sum> fills the space exactly under these conditions.

A physical motivation is the separation of <normal modes>. Consider two equal <masses> $m$ between three identical <springs> of stiffness $k$, with the outer ends fixed. By <Hooke's law> and <Newton's second law>, the displacement <vector> $q=(q_1,q_2)^T$ obeys
$$
m\ddot q=-kKq,\qquad K=\begin{pmatrix}2&-1\\-1&2\end{pmatrix}.
$$
The <eigenvectors> $(1,1)^T$ and $(1,-1)^T$ have <eigenvalues> $1$ and $3$: the <masses> move together in the first <normal mode> and oppositely in the second. Writing $q=a(t)(1,1)^T+b(t)(1,-1)^T$ separates the coupled equations into two <harmonic oscillators>,
$$
\ddot a+\frac{k}{m}a=0,\qquad \ddot b+\frac{3k}{m}b=0.
$$
Their <angular frequencies> are $\sqrt{k/m}$ and $\sqrt{3k/m}$; the <eigenvalues> give squared <angular frequencies> after multiplication by $k/m$. This is the beauty of <diagonalization>: finding the right directions turns interacting motions into independent patterns. For a physical treatment, see Yen-Jie Lee's "Coupled Oscillators, Normal Modes" (MIT 8.03SC, 2016), and the local article <normal modes of two equal masses between three springs>.https://ocw.mit.edu/courses/8-03sc-physics-iii-vibrations-and-waves-fall-2016/resources/mit8_03scf16_hw_lec4/[Lee's 2016 lecture notes on coupled oscillators and normal modes]{ref}