根据我的理解,需要进行分解/因式分解(LU、QR、Cholesky 等),然后基于因式分解进行矩阵逆计算。还有其他方法可以解决它吗(我试图弄清楚我是否可以坚持使用 CULAtools)?预先感谢您的评论。
From my understanding, a decomposition/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.
发布评论
评论(2)
计算矩阵逆的 LAPACK 例程为
xyyTRI
,其中x
表示数据类型(“S”表示单精度实数,“D”表示双精度实数,“C”表示' 表示单精度复数,'Z' 表示双精度复数),yy
表示矩阵类型('GE' 表示非对称矩阵的一般情况;还有 20 多种其他两字母代码对于其他矩阵类型)。对于实值矩阵,您通常会使用DGETRI
,对于复值矩阵,您通常会使用ZGETRI
。The LAPACK routines that calculate the matrix inverse are
xyyTRI
, wherex
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) andyy
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 useDGETRI
, and for complex-valued matrices, you'd usually useZGETRI
.当然,找到辅助矩阵;这是反转小矩阵的简单方法。辅助矩阵只是辅助因子矩阵的转置,方阵的逆矩阵只是辅助除以(标量)行列式。如果这些术语不熟悉,请在维基百科上查找。
如果您正在使用大型矩阵,我会购买该软件包。
保罗
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