Evaluating a Polynomial at a Matrix
A polynomial in a symmetric matrix is easier to compute by working with the matrix’s eigenvalues than by repeatedly multiplying out its entries. The reason is that an eigenvector behaves especially simply under powers: if \(\mathbf{A}\mathbf{v}=\lambda\mathbf{v}\), then applying \(\mathbf{A}\) again only multiplies that vector by another factor of \(\lambda\). A polynomial therefore acts on the eigenvector by replacing \(\lambda\) with the scalar \(p(\lambda)\).
Throughout, \(\mathbf{A}\) is a real symmetric \(n\times n\) matrix, and \(p\) is a polynomial with real coefficients. For \(p(t)=c_0+c_1t+\cdots+c_dt^d\), define \(p(\mathbf{A})\) by replacing each scalar power \(t^k\) with the matrix power \(\mathbf{A}^k\):
For example, if \(p(t)=t^2-3t+2\), then \(p(\mathbf{A})=\mathbf{A}^2-3\mathbf{A}+2\mathbf{I}_n\). This definition applies whether or not \(\mathbf{A}\) is symmetric. Symmetry matters here because the Spectral Theorem, established earlier in the course, guarantees an orthogonal diagonalization over \(\mathbb{R}\): there are an orthogonal matrix \(\mathbf{Q}\), with \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\), and a diagonal matrix \(\mathbf{\Lambda}\) such that \(\mathbf{A}=\mathbf{Q}\mathbf{\Lambda}\mathbf{Q}^{\top}\). The diagonal entries of \(\mathbf{\Lambda}\) are the eigenvalues of \(\mathbf{A}\).
The Polynomial Action on Eigenvectors
Proof. Write \(p(t)=\sum_{k=0}^d c_kt^k\). First, \(\mathbf{A}^0\mathbf{v}=\mathbf{v}=\lambda^0\mathbf{v}\). If \(\mathbf{A}^k\mathbf{v}=\lambda^k\mathbf{v}\), then \(\mathbf{A}^{k+1}\mathbf{v}=\mathbf{A}(\lambda^k\mathbf{v})=\lambda^k\mathbf{A}\mathbf{v}=\lambda^{k+1}\mathbf{v}\). Thus, by induction, \(\mathbf{A}^k\mathbf{v}=\lambda^k\mathbf{v}\) for every \(k\) from \(0\) to \(d\). Consequently, \(p(\mathbf{A})\mathbf{v}=\sum_{k=0}^d c_k\mathbf{A}^k\mathbf{v} =\sum_{k=0}^d c_k\lambda^k\mathbf{v} =p(\lambda)\mathbf{v}\). Because \(\mathbf{v}\ne\mathbf{0}\), when \(p(\lambda)\ne0\) this is the eigenvector equation with eigenvalue \(p(\lambda)\); when \(p(\lambda)=0\), the image is the zero vector instead. \(\square\)
The theorem gives a direct computation rule through the Spectral Theorem. If \(\mathbf{A}=\mathbf{Q}\mathbf{\Lambda}\mathbf{Q}^{\top}\), then powers of \(\mathbf{A}\) are obtained by taking the same powers of the diagonal entries of \(\mathbf{\Lambda}\). Therefore:
Proof. Orthogonality gives \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\). For every positive integer \(k\), multiplying \(\mathbf{A}=\mathbf{Q}\mathbf{\Lambda}\mathbf{Q}^{\top}\) repeatedly and cancelling each adjacent factor \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\) gives \(\mathbf{A}^k=\mathbf{Q}\mathbf{\Lambda}^k\mathbf{Q}^{\top}\). The same identity holds for \(k=0\), since \(\mathbf{A}^0=\mathbf{I}_n=\mathbf{Q}\mathbf{I}_n\mathbf{Q}^{\top}\). Thus \(p(\mathbf{A})=\sum_{k=0}^d c_k\mathbf{A}^k =\mathbf{Q}\left(\sum_{k=0}^d c_k\mathbf{\Lambda}^k\right)\mathbf{Q}^{\top}\). The matrix in parentheses is diagonal. Its \(i\)th diagonal entry is \(\sum_{k=0}^d c_k\lambda_i^k=p(\lambda_i)\), proving the formula. \(\square\)
It is often helpful to group equal eigenvalues. For each distinct eigenvalue \(\lambda\), let \(E_\lambda=\{\mathbf{x}:\mathbf{A}\mathbf{x}=\lambda\mathbf{x}\}\), and let \(\mathbf{P}_\lambda\) be the orthogonal projector onto \(E_\lambda\), meaning the linear map that keeps the component in \(E_\lambda\) and sends its orthogonal complement to zero. The spectral decomposition gives \(\mathbf{A}=\sum_\lambda\lambda\mathbf{P}_\lambda\) and \(\mathbf{I}_n=\sum_\lambda\mathbf{P}_\lambda\). Applying the polynomial formula yields the useful grouped form:
The sum here is over the distinct eigenvalues of \(\mathbf{A}\), not over an arbitrary list of repeated entries. This form makes the action on each whole eigenspace visible: \(p(\mathbf{A})\) scales every vector in \(E_\lambda\) by the same scalar \(p(\lambda)\).
Computing from a Spectral Decomposition
Worked Example: A Quadratic Polynomial in a Two-by-Two Matrix
Let \(\mathbf{A}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\), and evaluate \(p(\mathbf{A})\) for \(p(t)=t^2-2t+1\). The vectors \(\mathbf{u}_1=\tfrac{1}{\sqrt{2}}(1,1)^{\top}\) and \(\mathbf{u}_2=\tfrac{1}{\sqrt{2}}(1,-1)^{\top}\) are orthonormal. Direct multiplication gives \(\mathbf{A}\mathbf{u}_1=3\mathbf{u}_1\) and \(\mathbf{A}\mathbf{u}_2=\mathbf{u}_2\), so the eigenvalues are \(3\) and \(1\).
With \(\mathbf{Q}=[\mathbf{u}_1\ \mathbf{u}_2]\), the diagonalization and the polynomial values are
The spectral formula gives
Check: From the definition, \(\mathbf{A}^2=\begin{bmatrix}5&4\\4&5\end{bmatrix}\), so \(\mathbf{A}^2-2\mathbf{A}+\mathbf{I}_2 =\begin{bmatrix}5&4\\4&5\end{bmatrix} -\begin{bmatrix}4&2\\2&4\end{bmatrix} +\begin{bmatrix}1&0\\0&1\end{bmatrix} =\begin{bmatrix}2&2\\2&2\end{bmatrix}\). Also, this result sends \(\mathbf{u}_1\) to \(4\mathbf{u}_1\) and \(\mathbf{u}_2\) to \(\mathbf{0}=p(1)\mathbf{u}_2\), as required.
Worked Example: Repeated Eigenvalues and Projectors
Consider the symmetric matrix \(\mathbf{A}=\begin{bmatrix}\tfrac12&\tfrac32&0\\\tfrac32&\tfrac12&0\\0&0&2\end{bmatrix}\) and the polynomial \(p(t)=t^2+t\). The orthonormal vectors \(\mathbf{u}_1=\tfrac{1}{\sqrt2}(1,1,0)^{\top}\), \(\mathbf{u}_2=\tfrac{1}{\sqrt2}(1,-1,0)^{\top}\), and \(\mathbf{u}_3=(0,0,1)^{\top}\) satisfy \(\mathbf{A}\mathbf{u}_1=2\mathbf{u}_1\), \(\mathbf{A}\mathbf{u}_2=-\mathbf{u}_2\), and \(\mathbf{A}\mathbf{u}_3=2\mathbf{u}_3\). Thus the eigenvalue \(2\) has a two-dimensional eigenspace and the eigenvalue \(-1\) has a one-dimensional eigenspace.
Evaluate the polynomial at the two distinct eigenvalues: \(p(2)=2^2+2=6\) and \(p(-1)=(-1)^2+(-1)=0\). The projector onto the eigenvalue-\(2\) eigenspace is \(\mathbf{P}_2=\mathbf{u}_1\mathbf{u}_1^{\top}+\mathbf{u}_3\mathbf{u}_3^{\top} =\begin{bmatrix}\tfrac12&\tfrac12&0\\\tfrac12&\tfrac12&0\\0&0&1\end{bmatrix}\). The projector onto the eigenvalue-\((-1)\) eigenspace is \(\mathbf{P}_{-1}=\mathbf{u}_2\mathbf{u}_2^{\top} =\begin{bmatrix}\tfrac12&-\tfrac12&0\\-\tfrac12&\tfrac12&0\\0&0&0\end{bmatrix}\). Therefore
Check: Directly, the square of the upper-left block of \(\mathbf{A}\) is \(\begin{bmatrix}\tfrac52&\tfrac32\\\tfrac32&\tfrac52\end{bmatrix}\), and the bottom-right entry of \(\mathbf{A}^2\) is \(4\). Hence \(\mathbf{A}^2+\mathbf{A} =\begin{bmatrix}3&3&0\\3&3&0\\0&0&6\end{bmatrix}\). In addition, the result multiplies \(\mathbf{u}_1\) and \(\mathbf{u}_3\) by \(6\), and sends \(\mathbf{u}_2\) to zero, matching the computed polynomial values.
When Polynomial Evaluation Merges Eigenspaces
Every eigenvector of \(\mathbf{A}\) remains an eigenvector of \(p(\mathbf{A})\) when its image is nonzero. However, the converse need not hold: different eigenvalues of \(\mathbf{A}\) can have the same value under \(p\). In that situation, \(p(\mathbf{A})\) acts by the same scalar on both eigenspaces, and their vectors can combine to form additional eigenvectors of \(p(\mathbf{A})\).
Proof. By the Spectral Theorem, every \(\mathbf{x}\in\mathbb{R}^n\) has a unique orthogonal decomposition \(\mathbf{x}=\sum_\lambda\mathbf{x}_\lambda\), where \(\mathbf{x}_\lambda\in E_\lambda(\mathbf{A})\). The eigenvector action already proved gives \(p(\mathbf{A})\mathbf{x}=\sum_\lambda p(\lambda)\mathbf{x}_\lambda\). If \(p(\mathbf{A})\mathbf{x}=\mu\mathbf{x}\), then \(\sum_\lambda(p(\lambda)-\mu)\mathbf{x}_\lambda=\mathbf{0}\). The terms belong to mutually orthogonal eigenspaces, so each term must be zero: taking the squared norm gives \(\sum_\lambda(p(\lambda)-\mu)^2\|\mathbf{x}_\lambda\|^2=0\). Every summand is nonnegative, so \(\mathbf{x}_\lambda=\mathbf{0}\) whenever \(p(\lambda)\ne\mu\). Thus \(\mathbf{x}\) lies in the stated sum. Conversely, if \(\mathbf{x}\) is a sum of vectors from eigenspaces with \(p(\lambda)=\mu\), then \(p(\mathbf{A})\mathbf{x}=\sum_\lambda p(\lambda)\mathbf{x}_\lambda=\mu\mathbf{x}\). The eigenspaces of a symmetric matrix are mutually orthogonal, so this sum is direct. If there are no eigenvalues with \(p(\lambda)=\mu\), the only such vector is \(\mathbf{0}\), giving the zero space. \(\square\)
Worked Example: A Polynomial Can Create More Eigenvectors
Let \(\mathbf{A}=\begin{bmatrix}0&1\\1&0\end{bmatrix}\) and \(p(t)=t^2\). The vectors \(\mathbf{u}_1=\tfrac1{\sqrt2}(1,1)^{\top}\) and \(\mathbf{u}_2=\tfrac1{\sqrt2}(1,-1)^{\top}\) satisfy \(\mathbf{A}\mathbf{u}_1=\mathbf{u}_1\) and \(\mathbf{A}\mathbf{u}_2=-\mathbf{u}_2\). Both eigenvalues become \(1\) under \(p\), since \(p(1)=p(-1)=1\). It follows that \(p(\mathbf{A})\) acts as the identity on both eigenspaces.
Check: \(\mathbf{I}_2\mathbf{u}_1=\mathbf{u}_1\) and \(\mathbf{I}_2\mathbf{u}_2=\mathbf{u}_2\), as predicted. In fact every nonzero vector is now an eigenvector with eigenvalue \(1\), including vectors that are not eigenvectors of \(\mathbf{A}\). For instance, \((1,0)^{\top}=\tfrac{1}{\sqrt2}\mathbf{u}_1+\tfrac{1}{\sqrt2}\mathbf{u}_2\), combining vectors from the two eigenspaces of \(\mathbf{A}\).
Common Mistake: Applying the Polynomial Entry by Entry
Polynomial evaluation uses matrix powers, not entrywise powers. For example, with \(\mathbf{B}=\begin{bmatrix}1&1\\1&1\end{bmatrix}\) and \(p(t)=t^2\), the incorrect entrywise calculation would leave every entry equal to \(1\). The actual calculation is matrix multiplication:
The distinction matters because each entry of \(\mathbf{B}^2\) is a row-by-column sum. As a check, \(\mathbf{B}(1,1)^{\top}=2(1,1)^{\top}\) and \(\mathbf{B}(1,-1)^{\top}=\mathbf{0}\), so \(\mathbf{B}^2\) acts by \(4\) and \(0\) on these respective eigenvectors. The computed matrix does exactly that; the entrywise answer \(\mathbf{B}\) would not.
For a symmetric matrix, the efficient approach is to identify its distinct eigenvalues and their eigenspaces, evaluate \(p\) at those eigenvalues, and then use the spectral projectors. This gives the whole matrix \(p(\mathbf{A})\), not just its action on a selected vector. It also identifies when the result has a larger eigenspace: this occurs when distinct eigenvalues of \(\mathbf{A}\) receive the same polynomial value.
Check Your Understanding
Use matrix powers and the spectral action carefully; distinguish eigenvectors of the original matrix from those that may appear after polynomial evaluation.
- If \(\mathbf{A}\mathbf{v}=-2\mathbf{v}\) and \(p(t)=t^3-1\), what is \(p(\mathbf{A})\mathbf{v}\)?
- A symmetric matrix has distinct eigenvalues \(0\) and \(3\). For \(p(t)=t(t-3)\), what is \(p(\mathbf{A})\)? Explain using the spectral decomposition.
- For the matrix \(\mathbf{A}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\), find the eigenvalues of \(p(\mathbf{A})\) when \(p(t)=t^2\), and identify an orthonormal eigenbasis.
- Why can \(p(\mathbf{A})\) have eigenvectors that are not eigenvectors of \(\mathbf{A}\)? Give the condition on polynomial values that allows this.
- For \(\mathbf{C}=\begin{bmatrix}1&0\\0&-1\end{bmatrix}\), compute \(\mathbf{C}^2\) by matrix multiplication and compare it with the entrywise square.