diff --git a/spec/API_specification/linear_algebra_functions.md b/spec/API_specification/linear_algebra_functions.md index 100efccf2..7348dc0b7 100644 --- a/spec/API_specification/linear_algebra_functions.md +++ b/spec/API_specification/linear_algebra_functions.md @@ -107,6 +107,39 @@ TODO TODO +(function-linalg-eigh)= +### linalg.eigh(x, /, *, upper=False) + +Returns the eigenvalues and eigenvectors of a symmetric matrix (or a stack of symmetric matrices) `x`. + + + +#### Parameters + +- **x**: _<array>_ + + - input array having shape `(..., M, M)` and whose innermost two dimensions form square matrices. Must have a floating-point data type. + +- **upper**: _bool_ + + - If `True`, use the upper-triangular part to compute the eigenvalues and eigenvectors. If `False`, use the lower-triangular part to compute the eigenvalues and eigenvectors. Default: `False`. + +#### Returns + +- **out**: _Tuple\[ <array> ]_ + + - a namedtuple (`e`, `v`) whose + + - first element must have shape `(..., M)` and consist of computed eigenvalues. + - second element must have shape `(..., M, M)`and have the columns of the inner most matrices contain the computed eigenvectors. + + Each returned array must have the same floating-point data type as `x`. + +```{note} + +Eigenvalue sort order is left unspecified. +``` + (function-eigvalsh)= ### eigvalsh()