Is there any simple algorithm for matrix inversion (that can be implemented using C/C++)?
Can QR decomposition be used for matrix inversion? How?
Can QR decomposition be used for matrix inversion?
5
$\begingroup$
linear-algebra
matrices
algorithms
numerical-methods
-
0The first question might be more suitable for [scicomp.SE](http://scicomp.stackexchange.com/). – 2012-02-20
1 Answers
14
Gauss–Jordan elimination can be used for matrix inversion.
A QR-decomposition can certainly be used for matrix inversion because if $A=QR$ then $A^{-1} = R^{-1} Q^{-1} = R^{-1} Q^{T}$ and $R^{-1}$ is easy to compute because $R$ is triangular.
But consider why you need to invert a matrix. In most cases, you don't: you just need to solve a linear system $Ax=b$. If $A=QR$ then this system is equivalent to $Rx = Q^T b$, which is easy to solve because $R$ is triangular.
-
0In any event: if one is using Gaussian elimination, some form of pivoting (partial, complete, or rook) is a must. With QR decomposition, one has a choice of (modified) Gram-Schmidt or Householder. If one takes the Householder route, one does not even need to explicitly form the orthogonal factor $\mathbf Q$ of $\mathbf A$ for solving $\mathbf A\mathbf x=\mathbf b$. – 2012-02-15