jax.lax.linalg.eigh
jax.lax.linalg.eigh#
- jax.lax.linalg.eigh(x, *, lower=True, symmetrize_input=True, sort_eigenvalues=True)[source]#
Eigendecomposition of a Hermitian matrix.
Computes the eigenvectors and eigenvalues of a complex Hermitian or real symmetric square matrix.
- Parameters
x (
Array
) – A batch of square complex Hermitian or real symmetric matrices with shape[..., n, n]
.lower (
bool
) – Ifsymmetrize_input
isFalse
, describes which triangle of the input matrix to use. Ifsymmetrize_input
isFalse
, only the triangle given bylower
is accessed; the other triangle is ignored and not accessed.symmetrize_input (
bool
) – IfTrue
, the matrix is symmetrized before the eigendecomposition by computing \(\frac{1}{2}(x + x^H)\).sort_eigenvalues (
bool
) – IfTrue
, the eigenvalues will be sorted in ascending order. IfFalse
the eigenvalues are returned in an implementation-defined order.
- Return type
Tuple
[Array
,Array
]- Returns
A tuple
(v, w)
.v
is an array with the same dtype asx
such thatv[..., :, i]
is the normalized eigenvector corresponding to eigenvaluew[..., i]
.w
is an array with the same dtype asx
(or its real counterpart if complex) with shape[..., n]
containing the eigenvalues ofx
in ascending order(each repeated according to its multiplicity).