Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Charpoly Calculator

Charpoly

Function: charpoly (<M>, <x>) Returns the characteristic polynomial for the matrix <M> with respect to variable <x>. That is, determinant (<M> - diagmatrix (length (<M>), <x>)).

m:matrix([3,2,0,0],[0,t+2,0,0],[0,0,t,t-3],[0,0,1,t]);
a:matrix([0,0,1,0],[0,1,0,0],[-1,0,0,1],[1,0,1,0]);
b:invert(a);
n:a.m.b;
s:n+transpose(n)-6*diagmatrix(4,1);
u:ev(s, t:3);
expand(charpoly(u, x));

          (%i1) a: matrix ([3, 1], [2, 4]);
                                      [ 3  1 ]
          (%o1)                       [      ]
                                      [ 2  4 ]
          (%i2) expand (charpoly (a, lambda));
                                     2
          (%o2)                lambda  - 7 lambda + 10
          (%i3) (programmode: true, solve (%));
          (%o3)               [lambda = 5, lambda = 2]
          (%i4) matrix ([x1], [x2]);
                                       [ x1 ]
          (%o4)                        [    ]
                                       [ x2 ]
          (%i5) ev (a . % - lambda*%, %th(2)[1]);
                                    [ x2 - 2 x1 ]
          (%o5)                     [           ]
                                    [ 2 x1 - x2 ]
          (%i6) %[1, 1] = 0;
          (%o6)                     x2 - 2 x1 = 0
          (%i7) x2^2 + x1^2 = 1;
                                      2     2
          (%o7)                     x2  + x1  = 1
          (%i8) solve ([%th(2), %], [x1, x2]);
                            1               2
          (%o8) [[x1 = - -------, x2 = - -------],
                         sqrt(5)         sqrt(5)

1 2 [x1 = -------, x2 = -------]] sqrt(5) sqrt(5)

There are also some inexact matches for charpoly. Try ?? charpoly to see them.

(%o1)                                true
(%i2) 

Charpoly Example

Related Examples

charpoly-eigenvectors-matrix

m:matrix([0,1],[1,0]);

charpoly(m,x);

eigenvectors(m);

Calculate

charpoly-coeff-expand-matrix

m: matrix([-3*s1-2*s2...

cp: expand(charpoly(m...

eq1: coeff(cp, x, 0);

Calculate

charpoly-expand-invert-matrix

m: matrix([3,-2,0],[0...

expand(charpoly(m,x));

invert(m);

Calculate

charpoly-echelon-eigenvectors-factor-matrix

A:matrix([1,1,-1],[2,...

eigenvectors(A);

charpoly(A,x);

Calculate

charpoly-matrix

A:matrix([1,2],[4,5]);

A;

simplify(charpoly(A,x));

Calculate

charpoly-eigenvalues-invert-matrix

M: matrix([1/2, -1/4]...

I: matrix([1, 0],[0,1]);

eigenvalues(M);

Calculate

charpoly-eigenvectors-invert-matrix-ratsimp-solve

A:matrix([1,1,1,1],[-...

Pol:charpoly(A,t);

ratsimp(Pol);

Calculate

charpoly-matrix-nullspace-rank

a: matrix([1,1],[0,1]);

rank(a);

nullspace(a);

Calculate

charpoly-eigenvalues-load-matrix-solve

load ("eigen");

a: matrix([1, -1],[2,...

solve(charpoly(a,x));

Calculate

charpoly-determinant-invert-load-matrix

m: matrix ([a, b], [c...

determinant (m);

invert (m);

Calculate