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

Eigenvalues and eigenvectors of a Hermitian or real symmetric matrix.


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’).


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].


LinAlgError :

If the eigenvalue computation does not converge.

See also

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


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


Next topic


This Page

Quick search