Easiest way to get the characteristic polynomial

268 Views Asked by At

What would be the easiest way to get the charateristic polynomial roots?!

What I'm actually doing right now is...

Given a matrix $A$, I calculate $\det(A-\lambda I) = 0$ with Laplace Expansion, and then, expand all terms to get usually a third degree equation (depends on the size of my matrix $A$)... Then I try to find one value for $\lambda$ that is root of that expression... Then I make a polynomial division, with the first expression (third degree equation) divided by $(x-a)$ when $a$ is the root that I've found. Then I get a second degree equation and use bhaskara method to get the other two roots. That method works, but it takes a long time and I can have many algebraic mistakes during the proccess, and if my first equation has degree $>3$ I'll be lost.

What is the proccess that I should adopt after the Laplace Expansion at $\det(A-\lambda I) = 0$? How can I simplify what I am doing?!

Thanks!

1

There are 1 best solutions below

5
On

As Mariano says in the comments, finding the roots of a characteristic polynomial is no easier than finding the roots of an arbitrary polynomial: you can try to factor it, or try the usual tricks to check for "easy" roots (i.e. the rational root test), but it could well be that a high-degree characteristic polynomial's roots can't be expressed in closed form.

In practice, if you want the approximate roots, you can find them using numerical codes like the Jenkins-Traub algortihm (https://github.com/sweeneychris/RpolyPlusPlus). Or you can skip forming the characteristic polynomial entirely and find the eigenvalues using eigs in Matlab, or a standard linear algebra package like Eigen (http://eigen.tuxfamily.org/index.php?title=Main_Page) in C/C++.