linalg
::charmat
Characteristic matrix
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
linalg::charmat(A
, x
)
linalg::charmat(A, x)
returns the characteristic
matrix x I_{n}  A of
the n×n matrix A,
where I_{n} denotes
the n×n identity
matrix.
The component ring of A
must be a commutative
ring, i.e., a domain of category Cat::CommutativeRing
.
The characteristic matrix M = x I_{n}  A of A can
be evaluated at a point x = u via evalp(M,
x = u)
. See Example 2.
We define a matrix over the rational numbers:
A := Dom::Matrix(Dom::Rational)([[1, 2], [3, 4]])
and compute the characteristic matrix of A in the variable x:
MA := linalg::charmat(A, x)
The determinant of the matrix MA
is a polynomial
in x,
the characteristic polynomial of the matrix A:
pA := det(MA)
domtype(pA)
Of course, we can compute the characteristic polynomial of A directly
via linalg::charpoly
:
linalg::charpoly(A, x)
The result is of the same domain type as the polynomial pA
.
We define a matrix over the complex numbers:
B := Dom::Matrix(Dom::Complex)([[1 + I, 1], [1, 1  I]])
The characteristic matrix of B
in the variable z is:
MB := linalg::charmat(B, z)
We evaluate MB
at z = i and
get the matrix:
evalp(MB, z = I)
Note that this is a matrix of the domain type Dom::Matrix(Dom::Complex)
:
domtype(%)

A square matrix of a domain of category 

An identifier 
Matrix of the domain Dom::Matrix(Dom::DistributedPolynomial([x],
R))
or of Dom::DenseMatrix(Dom::DistributedPolynomial([x],
R))
, where R
is the component ring of A
.