C12 Page 298

Find the characteristic polynomial of the matrix:

\(A = \left[ \begin{array}{cccc} 1 & 2 & 1 & 0 \\ 1 & 0 & 1 & 0 \\ 2 & 1 & 1 & 0 \\ 3 & 1 & 0 & 1 \\ \end{array} \right] \\ \)

The characteristic polynomial of square matrix \(A\) is defined as \(f_A(\lambda)=det(A−\lambda I)\)

\((A−\lambda I)\) = \(A = \left[ \begin{array}{cccc} 1 & 2 & 1 & 0 \\ 1 & 0 & 1 & 0 \\ 2 & 1 & 1 & 0 \\ 3 & 1 & 0 & 1 \\ \end{array} \right] \\ \) - \(\lambda\) \(\left[ \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} \right] \\ \) = \(\left[ \begin{array}{cccc} 1-\lambda & 2 & 1 & 0 \\ 1 & -\lambda & 1 & 0 \\ 2 & 1 & 1-\lambda & 0 \\ 3 & 1 & 0 & 1-\lambda \\ \end{array} \right] \\ \)

Therefore \(det(A−\lambda I) = det\) \(\left[ \begin{array}{cccc} 1-\lambda & 2 & 1 & 0 \\ 1 & -\lambda & 1 & 0 \\ 2 & 1 & 1-\lambda & 0 \\ 3 & 1 & 0 & 1-\lambda \\ \end{array} \right] \\ \)

After reducing the matrix to row echelon and simplifyin all expression, we’ll obtain:

\(det(A−\lambda I) = \lambda^4-3\lambda^3-2\lambda^2+2\lambda+2\)

Hence: \(f_A(\lambda)= \lambda^4-3\lambda^3-2\lambda^2+2\lambda+2\)

If in doubt, let’s get R opinion using the pracma library

library(pracma)

A <- matrix(data = c(1,2,1,0,
                     1,0,1,0,
                     2,1,1,0,
                     3,1,0,1), nrow=4, byrow=TRUE)

A
##      [,1] [,2] [,3] [,4]
## [1,]    1    2    1    0
## [2,]    1    0    1    0
## [3,]    2    1    1    0
## [4,]    3    1    0    1
#determinind the characteristic polynomial of A

charpoly(A, info = FALSE)
## [1]  1 -3 -2  2  2

The result is interpreted as: \(f_A(\lambda)= \lambda^4-3\lambda^3-2\lambda^2+2\lambda+2\)