Why is this happening? Symbolic

I calculate the caracteristic polinomial of a matrix in two different ways and the result is not the same, it is opposite.
I have a matrix M:
syms v w x y z lambda
M=[v+w 8 x*3;
y-z 1 4*x;
z 3 4];
First I calculate the caracterisc polinomial by:
I=eye(size(M));
Pcaratt=det(M-lambda*I);
Then I do it by:
polinomio=poly(M,lambda);
Finally, if I do:
aux=Pcaratt-polinomio;
the result is not zero. Insted of that, doing:
aux=-Pcaratt-polinomio;
I get zero. Why Pcaratt and polinomio are opposite?
Thank you very much.

 Respuesta aceptada

Andrew Newell
Andrew Newell el 29 de Mzo. de 2011

0 votos

The definition of characteristic polynomial seems to vary. For example, Wolfram World defines it the way you did, but Wikipedia would define it as
Pcaratt = det(lambda*I-M);
Then you would get Pcaratt=polinomio. Either way, the equations have the same roots, so the choice of sign is not very important.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 29 de Mzo. de 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by