Lapack calls to invert a matrix
From my understanding, a decompositio开发者_如何学运维n/factorization (LU, QR, Cholesky, etc.) is required, followed by matrix inverse calculation based on the factorization. Are there any other ways of getting around it (I'm trying to figure out whether I can stick with the 6 functions given for free in the tryout version of CULAtools)? Thanks in advance for the comments.
The LAPACK routines that calculate the matrix inverse are xyyTRI
, where x
indicates the data type ('S' for single precision real, 'D' for double precision real, 'C' for single precision complex, and 'Z' for double precision complex) and yy
indicates the type of matrix ('GE' for the general case of unsymmetric matrices; there are 20+ other two-letter codes for other matrix types). For real-valued matrices, you'd usually use DGETRI
, and for complex-valued matrices, you'd usually use ZGETRI
.
Sure, find the Adjugate matrix; that's a simple way of inverting small matricies. The adjugate matrix is just the transpose of the matrix of co-factors, and the inverse of a square matrix is just the adjugate divided by the (scalar) determinant. Look up these terms on Wikipedia if they aren't familiar.
If you are working w/ large matrices, I'd buy the package.
Paul
精彩评论