minpoly
Minimal polynomial of matrix
Syntax
Description
Examples
Compute Minimal Polynomial of Matrix
Compute the minimal polynomial of the matrix A
in
terms of the variable x
:
syms x A = sym([1 1 0; 0 1 0; 0 0 1]); minpoly(A, x)
ans = x^2 - 2*x + 1
Compute Coefficients of Minimal Polynomial
To find the coefficients of the minimal polynomial of
A
, call minpoly
with one argument. Since
A
is numeric, minpoly
returns coefficients as
double-precision values:
A = sym([1 1 0; 0 1 0; 0 0 1]); minpoly(A)
ans = [ 1, -2, 1]
Find the coefficients of the minimal polynomial of the symbolic matrix
A
. For this matrix, minpoly
returns the symbolic
vector of coefficients:
A = sym([0 2 0; 0 0 2; 2 0 0]); P = minpoly(A)
P = [ 1, 0, 0, -8]
Input Arguments
More About
Version History
Introduced in R2012b