characteristicPolynomial {qspray} | R Documentation |
Characteristic polynomial
Description
Characteristic polynomial of a matrix.
Usage
characteristicPolynomial(A)
Arguments
A |
a square matrix with numeric, character, or |
Value
A univariate qspray
polynomial.
Examples
set.seed(666)
A <- matrix(rpois(9L, 10), nrow = 3, ncol = 3)
( P <- characteristicPolynomial(A) )
# check the roots are the eigen values:
f <- as.function(P, N = TRUE)
sapply(eigen(A)$values, f) # approx c(0, 0, 0)
[Package qspray version 3.1.0 Index]