Consider the matrix:
A = {{-1, -4, -2}, {0, 1, 1}, {-6, -12, 2}}
Now, the characteristic polynomial is found:
p[λ_] = CharacteristicPolynomial[A, λ]
Now, how can I substitute the matrix A
into the polynomial to verify that the answer is the zero matrix?
Answer
To verify that matrix is a zero of its characteristic polynomial, The Characteristic polynomial of the matrix is found, then evaluated for the matrix. The result should be the zero matrix.
Clear[x]
a = {{-1, -4, -2}, {0, 1, 1}, {-6, -12, 2}};
n = Length[a];
p = CharacteristicPolynomial[a, x];
(Sum[ Coefficient[p, x, i] MatrixPower[a, i], {i, 0, Exponent[p, x]}]) // MatrixForm
another way:
cl = CoefficientList[p, x];
Sum[MatrixPower[a, j - 1] cl[[j]], {j, 1, Length[cl]}]
Comments
Post a Comment