## pracma
## TRUE
Exercise EE.C12
Find the characteristic polynomial of the matrix A.
\[\begin{equation}A = \begin{bmatrix} 1 & 2 & 1 & 0\\ 1 & 0 & 1 & 0\\ 2 & 1 & 1 & 0\\ 3 & 1 & 0 & 1 \end{bmatrix}\end{equation}\]In R
Aij <- c(1,2,1,0,1,0,1,0,2,1,1,0,3,1,0,1)
A <- matrix(Aij, 4, 4, byrow = T)
charpoly(A)## [1] 1 -3 -2 2 2
\(p_{A}(x) = 2 + 2x - 2x^2 - 3x^3 + x^4\)