Matrix Utilities

Top  Previous  Next

GAMS includes a set of matrix utilities.  They are

 

INVERT

A routine that calculates the inverse of a matrix

CHOLESKY

A routine that does a Cholesky factorization of a symmetric matrix decomposition retuning a lower triangular matrix (L) such that the original matrix (A) equals the lower triangular matrix L times its transpose (A=LL')

EIGENVALUE

A routine that calculates eigenvalues of a symmetric matrix

EIGENVECTOR

A routine that calculates eigenvalues and eigenvectors of a symmetric matrix

 

All of these require use of a GDX file to first pass the data to the utility than to being back the result.

 

All make the assumption that the matrix to be worked on is of the form a(i,i) ie that the row and column index sets are the same.  This is not typically the case for matrix inversion and an alternative inversion routine is given in inverse2.gms.