numpy.linalg.eigh

numpy.linalg.eigh(a, UPLO='L')

Eigenvalues and eigenvectors of a Hermitian or real symmetric matrix.

Parameters:

a : array_like, shape (M, M)

A complex Hermitian or symmetric real matrix.

UPLO : {‘L’, ‘U’}, optional

Specifies whether the calculation is done with data from the lower triangular part of a (‘L’, default) or the upper triangular part (‘U’).

Returns:

w : ndarray, shape (M,)

The eigenvalues. The eigenvalues are not necessarily ordered.

v : ndarray, shape (M, M)

The normalized eigenvector corresponding to the eigenvalue w[i] is the column v[:,i].

Raises:

LinAlgError :

If the eigenvalue computation does not converge.

See also

eigvalsh
eigenvalues of symmetric or Hemitiean arrays.
eig
eigenvalues and right eigenvectors for non-symmetric arrays
eigvals
eigenvalues of non-symmetric array.

Notes

A simple interface to the LAPACK routines dsyevd and zheevd that compute the eigenvalues and eigenvectors of real symmetric and complex Hermitian arrays respectively.

The number w is an eigenvalue of a if there exists a vector v satisfying the equation dot(a,v) = w*v. Alternately, if w is a root of the characteristic equation det(a - w[i]*I) = 0, where det is the determinant and I is the identity matrix. The eigenvalues of real symmetric or complex Hermitean matrices are always real. The array v of eigenvectors is unitary and a, w, and v satisfy the equation dot(a,v[i]) = w[i]*v[:,i].

Previous topic

numpy.linalg.eig

Next topic

numpy.linalg.eigvals

This Page

Quick search