Maths WorkshopMaths problems with full solutions
Exercise 174Linear algebra › Eigenvalues and diagonalisationL2Added 3 Nov 2026

Functions of a diagonalizable matrix

#functions of matrices#diagonalization#polynomial#well-definedness

Statement

Let AA be a diagonalizable matrix with distinct eigenvalues μ1,…,μr\mu_1,\ldots,\mu_r, and let ff be a function defined at the μi\mu_i. For a diagonalization A=PDP−1A=PDP^{-1}, D=diag(λ1,…,λn)D=\textrm{diag}(\lambda_1,\ldots,\lambda_n), define f(A)=P f(D) P−1f(A)=P\,f(D)\,P^{-1} where f(D)=diag(f(λ1),…,f(λn))f(D)=\textrm{diag}(f(\lambda_1),\ldots,f(\lambda_n)).

  1. Show that if ff is a polynomial, this agrees with the usual f(A)=∑kakAkf(A)=\sum_ka_kA^k.
  2. Show that the definition does not depend on the choice of PP and DD (it is well defined).
  3. Compute A\sqrt A for A=(2112)A=\begin{pmatrix}2&1\\1&2\end{pmatrix}.
Hint

For (2), choose a polynomial qq with q(μi)=f(μi)q(\mu_i)=f(\mu_i) for all ii (Lagrange interpolation) and show P f(D)P−1=q(A)P\,f(D)P^{-1}=q(A).

Show solutionHide solution

Solution

(1) Polynomial case. For f(X)=∑kakXkf(X)=\sum_ka_kX^k, using Ak=PDkP−1A^k=PD^kP^{-1}:
f(A)=∑kakPDkP−1=P(∑kakDk)P−1=P f(D) P−1,f(A)=\sum_ka_kPD^kP^{-1}=P\Big(\sum_ka_kD^k\Big)P^{-1}=P\,f(D)\,P^{-1},
since ∑kakDk=diag(f(λj))\sum_ka_kD^k=\textrm{diag}\big(f(\lambda_j)\big).

(2) Well-definedness. Every diagonal entry λj\lambda_j of DD is one of the μi\mu_i. Let qq be a polynomial with q(μi)=f(μi)q(\mu_i)=f(\mu_i) for i=1,…,ri=1,\ldots,r (e.g. q=∑if(μi)∏j≠iX−μjμi−μjq=\sum_if(\mu_i)\prod_{j\neq i}\frac{X-\mu_j}{\mu_i-\mu_j}). Then f(D)=q(D)f(D)=q(D), and by (1)
P f(D) P−1=P q(D) P−1=q(PDP−1)=q(A).P\,f(D)\,P^{-1}=P\,q(D)\,P^{-1}=q(PDP^{-1})=q(A).
The right-hand side depends only on AA (and ff on the spectrum), not on the chosen PP and DD.

(3) Example. A(1,−1)T=(1,−1)TA(1,-1)^T=(1,-1)^T and A(1,1)T=3(1,1)TA(1,1)^T=3(1,1)^T, so A=PDP−1A=PDP^{-1} with P=(11−11)P=\begin{pmatrix}1&1\\-1&1\end{pmatrix}, D=diag(1,3)D=\textrm{diag}(1,3), P−1=12(1−111)P^{-1}=\frac12\begin{pmatrix}1&-1\\1&1\end{pmatrix}. Then
A=Pdiag(1,3)P−1=12(1+33−13−11+3).\sqrt A=P\textrm{diag}(1,\sqrt3)P^{-1}=\frac12\begin{pmatrix}1+\sqrt3&\sqrt3-1\\\sqrt3-1&1+\sqrt3\end{pmatrix}.
Check: the (1,1)(1,1) entry of (A)2(\sqrt A)^2 is 14((1+3)2+(3−1)2)=84=2\frac14\big((1+\sqrt3)^2+(\sqrt3-1)^2\big)=\frac{8}{4}=2 and the (1,2)(1,2) entry is 14⋅2(1+3)(3−1)=1\frac14\cdot2(1+\sqrt3)(\sqrt3-1)=1, as required.

Conclusion. Functions of a diagonalizable matrix are well defined through its eigen-decomposition and coincide with polynomial functions of AA on the spectrum. For a power series such as etA=∑ktkAk/k!e^{tA}=\sum_kt^kA^k/k! one gets etA=Pdiag(etλj)P−1e^{tA}=P\textrm{diag}(e^{t\lambda_j})P^{-1}. For non-diagonalizable matrices one uses the Jordan form instead.