Find the characteristic polynomial of the matrix A

## declare the Matrix
A = matrix( c(3,2,1,0,1,1,1,2,0), nrow = 3, ncol=3, byrow = TRUE)

charpoly(A)
## [1]  1 -4  0  5

-λ^3 + 4λ^2 -5 is the answer