jax.numpy.linalg.eig

Contents

jax.numpy.linalg.eig#

jax.numpy.linalg.eig(a)[source]#

Compute the eigenvalues and right eigenvectors of a square array.

LAX-backend implementation of numpy.linalg.eig().

This differs from numpy.linalg.eig() in that the return type of jax.numpy.linalg.eig() is always complex64 for 32-bit input, and complex128 for 64-bit input.

At present, non-symmetric eigendecomposition is only implemented on the CPU backend. However eigendecomposition for symmetric/Hermitian matrices is implemented more widely (see jax.numpy.linalg.eigh()).

Original docstring below.

Parameters:

a ((..., M, M) array) – Matrices for which the eigenvalues and right eigenvectors will be computed

Return type:

tuple[Array, Array]

Returns:

  • A namedtuple with the following attributes

  • eigenvalues ((…, M) array) – The eigenvalues, each repeated according to its multiplicity. The eigenvalues are not necessarily ordered. The resulting array will be of complex type, unless the imaginary part is zero in which case it will be cast to a real type. When a is real the resulting eigenvalues will be real (0 imaginary part) or occur in conjugate pairs

  • eigenvectors ((…, M, M) array) – The normalized (unit “length”) eigenvectors, such that the column eigenvectors[:,i] is the eigenvector corresponding to the eigenvalue eigenvalues[i].

References

G. Strang, Linear Algebra and Its Applications, 2nd Ed., Orlando, FL, Academic Press, Inc., 1980, Various pp.