Reputation: 574
What is the math behind numpy.roots? How does numpy find the roots of an equation?
Upvotes: 1
Views: 624
Reputation: 208
In the link of the documentation that you provided (numpy.roots) says that the algorithm relies on computing the eigenvalues of the companion matrix. The math is on the page 191 (3.3 The minimal polynomial and the companion matrix) of the book Matrix analysis.
Also, here's a pretty good explanation: Eigenvalue-Polynomials. This is more like an overview of the algorithm. It doesn't tell how to calculate the eigenvectors.
Hope that helps :)
Upvotes: 2