C12

Find the characteristic polynomial of the matrix A:

\[A=\begin{bmatrix} 1 & 2 & 1 & 0 \\ 1 & 0 & 1 & 0 \\ 2 & 1 & 1 & 0 \\ 3 & 1 & 0 & 1 \end{bmatrix}\]

d3 <-matrix(c(1,1,2,3,2,0,1,1,1,1,1,0,0,0,0,1),nrow = 4,ncol = 4)

d3_info <- eigen(d3)
(cp <- d3_info$values)
## [1]  3.365230+0.0000000i  1.000000+0.0000000i -0.682615+0.3582594i
## [4] -0.682615-0.3582594i

Determinant

(d3_det <- det(d3))
## [1] 2

Rank

(R(d3))
## [1] 4