Find the characteristic polynomial of the matrix A =1 2 3 4.
Using charpoly function to find the polynomial matrix
# create the matrix
A <- matrix(c(1,2,3,4), nrow = 2, byrow = TRUE)
A
## [,1] [,2]
## [1,] 1 2
## [2,] 3 4
install.packages('pracma', repos = "http://cran.us.r-project.org")
## Installing package into 'C:/Users/Anil Akyildirim/Documents/R/win-library/3.6'
## (as 'lib' is unspecified)
## package 'pracma' successfully unpacked and MD5 sums checked
##
## The downloaded binary packages are in
## C:\Users\Anil Akyildirim\AppData\Local\Temp\Rtmpq4w4wC\downloaded_packages
library('pracma')
# use charpoly
charpoly(A, info = FALSE)
## [1] 1 -5 -2
The answer is:
\[t^{2} -5t -2 =0\]
Another Method to find the characteristic polynomial of matrix A
I <- matrix(c(1,0,0,1), nrow = 2, byrow = TRUE)
I
## [,1] [,2]
## [1,] 1 0
## [2,] 0 1
charpoly(A, info = FALSE)
## [1] 1 -5 -2
Unfortunately i got stuck on assining a non numerical object to lambda and do the equation. My intention was to further use det() function to find the characteristic of the polynomial of the matrix.