a = rand(10,10)
b = inv(a)
b*a
det(ans)
a*b
det(ans)
查了官方文档:
Matrix inverse. Computes matrix
Nsuch thatM * N = I, whereIis the identity matrix. Computed by solving the left-divisionN = M \ I.
\(A, B) Matrix division using a polyalgorithm. For input matrices
AandB, the resultXis such thatA*X == BwhenAis square.
所以就是LU然后对三角阵求逆没有其他方法了对吧?