-4
$\begingroup$

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?

$\endgroup$
6
  • 4
    $\begingroup$ $2\times 3$ matrices have no inverse. $\endgroup$ Oct 1 '16 at 21:46
  • 1
    $\begingroup$ Welcome to the site. Next time before posting try looking for an answer using Google or use the search feature here. math.stackexchange.com/questions/991736/… math.stackexchange.com/questions/1942241/… $\endgroup$
    – Andrew
    Oct 1 '16 at 21:54
  • $\begingroup$ @JackyChong *two-sided inverse. There are $2\times 3$ matrices with right inverses, for example. $\endgroup$
    – Glare
    Oct 1 '16 at 21:56
  • 3
    $\begingroup$ @Glare The term "inverse", without any additions, is usually taken as double sided inverse of, a fortiori, square matrices. If it was one sided inverses then the question should make this clear. $\endgroup$
    – DonAntonio
    Oct 1 '16 at 21:58
  • 1
    $\begingroup$ @DonAntonio I absolutely agree with you. I doubt somebody who doesn't know enough linear algebra that they need to ask how to compute inverses would bother with the distinction though (or even be aware of it), so it's certainly helpful to point it out rather than flatly dismissing their question. $\endgroup$
    – Glare
    Oct 1 '16 at 22:02
2
$\begingroup$

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)$.

$\endgroup$
5
  • $\begingroup$ "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. $\endgroup$
    – DonAntonio
    Oct 1 '16 at 22:02
  • $\begingroup$ 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 $\endgroup$
    – Bernard
    Oct 1 '16 at 22:12
  • $\begingroup$ 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. $\endgroup$
    – DonAntonio
    Oct 1 '16 at 22:16
  • $\begingroup$ It's quite common in France. $\endgroup$
    – Bernard
    Oct 1 '16 at 22:18
  • $\begingroup$ 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. $\endgroup$
    – DonAntonio
    Oct 1 '16 at 22:22
0
$\begingroup$

$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.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.