EigenDecomp
EigenDecomp( A, I, J )
Computes the Eigenvalues and Eigenvectors of a square symmetric matrix A indexed by I and J. Eigenvalues and Eigenvectors are also called characteristic values and characteristic vectors.
The pairs of Eigenvalues and Eigenvectors returned are indexed by J. If B is the result of evaluating EigenDecomp(A,I,J), then the Eigenvalues are given by
B[.item='value']
and the Eigenvectors are given by
#B[.item='vector']
Each Eigenvector is indexed by I.
Library
Matrix
Testing for Definiteness
A square matrix A is positive definite if for for every non-zero vector x, the matrix product x'Ax > 0. The matrix A is positive definite if and only if all eigenvalues are positive, and thus the following expression tests for positive-definiteness:
Function IsPosDefinite(A:Array[I,J] ; I,J : Index) := min(EigenDecomp(A,I,J)[.item='value']>0,J)
Square matrix A is positive semi-definite when x'Ax >= 0 for every vector x, which implies that the eigenvectors are all non-negative.
Function IsPosSemiDefinite(A:Array[I,J] ; I,J : Index) := min(EigenDecomp(A,I,J)[.item='value']>=0,J)
Negative definite and Negative-semidefinite are tested for similarly:
Function IsNegDefinite(A:Array[I,J] ; I,J : Index) := min(EigenDecomp(A,I,J)[.item='value']<0,J)
Function IsNegSemiDefinite(A:Array[I,J] ; I,J : Index) := min(EigenDecomp(A,I,J)[.item='value']<=0,J)
Principle Components
(to fill in)
Enable comment auto-refresher