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-expand-matrix

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

expand(charpoly(a,x));

Calculate

charpoly-expand-matrix

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

expand(charpoly(A,x));

Calculate

charpoly-determinant-invert-matrix-pi

f(x):=if x>0 then ...

f(%pi);

f(-0.2);

Calculate

charpoly-coeff-matrix-ratexpand

A:matrix([2,1+t,0],[1...

expr:charpoly(A,x);

expr2=ratexpand(expr);

Calculate

charpoly-coeff-determinant-diagmatrix-ev-matrix-ratexpand-solve-transpose

A:matrix([2,1+t,0],[1...

expr:charpoly(A,x);

expr2:ratexpand(expr);

Calculate

charpoly-expand-matrix

A:matrix([2,1+t,1],[1...

charpoly(A,x);

expand(%);

Calculate

charpoly-diagmatrix-ev-expand-invert-matrix-transpose

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

a:matrix([0,0,1,0],[0...

b:invert(a);

Calculate

charpoly-matrix

charpoly(matrix([1,-1...

Calculate

charpoly-eigenvectors-invert-matrix-ratsimp-solve

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

B:A.A;

Pol:charpoly(B,t);

Calculate

charpoly-load-matrix-solve

load ("eigen");

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

solve(charpoly(a,x));

Calculate