page 388 C11.Find the characteristic polynomial of the matrix

\[\mathbf{A} = \left[\begin{array} {rrr} 3 & 2 & 1 \\ 0 & 1 & 1 \\ 1 & 2 & 0 \\ \end{array}\right] \]

Answer:

Here,

Identity matrix

\[\mathbf{I} = \left[\begin{array} {rrr} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array}\right] \]

\[\mathbf{??I} = \left[\begin{array} {rrr} ?? & 0 & 0 \\ 0 & ?? & 0 \\ 0 & 0 & ?? \\ \end{array}\right] \]

According to the formula,

# p(??) = det(A- ??I)

Now, let’s do it in R

A <- as.matrix(data.frame(c(3,0,1),c(2,1,2),c(1,1,0)))
A
##      c.3..0..1. c.2..1..2. c.1..1..0.
## [1,]          3          2          1
## [2,]          0          1          1
## [3,]          1          2          0
# let's calculate the eigenvalues and eigenvectors
e <- eigen(A)
e$values
## [1]  3.618034  1.381966 -1.000000
e$vectors
##           [,1]       [,2]          [,3]
## [1,] 0.9363100  0.8087826  1.073631e-16
## [2,] 0.1253069 -0.5493940 -4.472136e-01
## [3,] 0.3280576 -0.2098498  8.944272e-01
# Handwork for the same discussion:
# characteristics polynomial of the matrix A

knitr::include_graphics('https://raw.githubusercontent.com/maharjansudhan/DATA605/master/Discussion3.jpg')