Finding eigenvalues and eigenvectors
Eigenvalues are scalar solutions to the equation Ax = ax
, where A
is a two-dimensional matrix and x
is a one-dimensional vector. Eigenvectors are vectors corresponding to eigenvalues (see https://www.khanacademy.org/math/linear-algebra/alternate_bases/eigen_everything/v/linear-algebra-introduction-to-eigenvalues-and-eigenvectors). The eigvals()
function in the numpy.linalg
package calculates eigenvalues. The eig()
function returns a tuple containing eigenvalues and eigenvectors.
Get NumPy : Beginner's Guide - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.