What is a general formula to find the inverse of a matrix? For example, how do you find the inverse of a 2 by 3 or 4 by 4 matrix?
2 Answers
The general formula for a square matrix $A$ is $$A^{-1}=\frac1{\det A}\,\operatorname{com}A,$$ where $\operatorname{com}A$ (the comatrix, or adjugate matrix, of $A$) is the transpose of the matrix of cofactors of $A$.
However, this formula is not used in practice, as its complexity, for a matrix of dimension $n$, is $O(n!)$. A much more efficient method is based on the pivot method: you apply elementary row operations on $A$, until it is transformed into the unit matrix. The same row operations, applied to unit matris, yield $A^{-1}$. This method has complexity $O(n^3)$.
- 175,478
-
"Comatrix" seems to be a highly non-standard term for what is more usually called adjugate matrix or classical adjoint matrix, or even just adjoint matrix. – DonAntonio Oct 01 '16 at 22:02
-
It's the term I learnt. It's more telling than ‘adjugate’, in my opinion, as it directly refers to the cofactors. As to ‘adjoint’, it's haighly ambiguous, as it's also used in the context of Hilbert or hermitian spaces – Bernard Oct 01 '16 at 22:12
-
Perhaps, yet you can try to google it and you'll see it hardly appears in some marginal sites. About adjoint I agree with you, and that's why I'd rather use adjugate or classical adjoint. – DonAntonio Oct 01 '16 at 22:16
-
-
And yet the world, as hard as it may seem to be to accept, includes slightly more than France...No, seriously: the term "comatrix", as you mention, seems to be better and clearer than the usual one, at least for me. – DonAntonio Oct 01 '16 at 22:22
$2\times 3$ matrices doesn't have inverse. And in general, $a\times b$ matrices don't, unless $a = b$.
There are two cute general formulas for $2\times 2$ matrices and $3\times 3$.
$$A = \begin{pmatrix} a & b\\ c & d \end{pmatrix} ~~~~~~~~~~~ A^{-1} = \frac{1}{\text{det}\ A}\begin{pmatrix} d & -b\\ -c & a \end{pmatrix} $$
$$B = \begin{pmatrix} a & b & c\\ d & e & f\\ g & h & i \end{pmatrix} ~~~~~~~~~~~ B^{-1} = \frac{1}{\text{det}\ B} \begin{pmatrix} (ei - fh) & (ch - bi) & (bf - ce)\\ (fg - di) & (ai - cg) & (cd - af)\\ (dh - eg) & (bg - ah) & (ae - bd) \end{pmatrix} $$
For a $4\times 4$ matrix you can use the LaPlace expansion.
- 26,114
https://math.stackexchange.com/questions/991736/explicit-formula-for-inverse-matrix-elements https://math.stackexchange.com/questions/1942241/find-inverse-of-a-linear-transormation-given-its-matrix/1942249#1942249
– Eman Yalpsid Oct 01 '16 at 21:54