# Matrix inverses - Why are they derived the way they are?

Note that this is not a question of how, but why. I know the mechanics of it, but this is the first thing i've come across that truly seems like magic, rather than a rigorous mathematical process.

There are questions on SE about proofs for the inverse, but niether here nor anywhere else on the internet, can I find a decent explanation of why it works the way it does:

So, basically, suppose the matrix is $\begin{bmatrix} a && b \\ c && d \end{bmatrix}$

Why do we swap values $a$ and $d$?

Why do $c$ and $b$ become negative?.

Why do we divide $a$, $b$, $c$ and $d$ by $ad-bc$?

Once again, this truly seems like magic. It's like ''hey, swap these fellers around, twiddle these signs a little, and poof, you're inverse!''.

Thanks in advance for any help :)

• Any math formula is "like magic" if someone just shows it to you as the solution to a problem and they do not explain how the formula was derived. For example, the formula for solving a quadratic equation, or the formula for the line through two given points in an x-y coordinate plane. – David K Jul 6 '15 at 22:59
• Unfortunately, there is no easy "Hey,swap these fellers around, twiddle these signs a little, and poof, you're an inverse!" analogue for $n \times n$ matrices where $n \geq 3$. The $2 \times 2$ matrix inverse is a very special case because its solution only has a few parts to it. Heck, even just finding a determinant of a $3 \times 3$ matrix is generally tedious! – Xoque55 Jul 6 '15 at 23:17
• "why" - an inverse is, by definition, what you need to multiply a matrix by to yield the identity matrix, just like a [multiplicative] inverse of a real number is what you need to multiply by that number to get 1. The form of that matrix, with the negatives and division, you can find for yourself by solving the equation A × ? = I. (as the answers to this question demonstrate, there are many ways to arrive at the solution) – Jimmy Jul 7 '15 at 1:21
• This method is based on a property of determinant, namely on Laplace expansion. – Alexey Jul 7 '15 at 12:05
• There are already good answers! I would like to point out that the question comes back to how, even if you stressed on the why. A good question is how did they get to that formula. Not to say that your question is not good! And by the way littleO answers the why question, and also answers the how. – innoSPG Jul 7 '15 at 14:44

## 4 Answers

You can derive it by simultaneous transforming $(A|I)\to(I|A^{-1})$. If $a \ne 0$ and $ad-bc\ne 0$ we get: $$\left[ \begin{array}{rr|rr} a & b & 1 & 0 \\ c & d & 0 & 1 \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & b/a & 1/a & 0 \\ c & d & 0 & 1 \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & b/a & 1/a & 0 \\ 0 & d - cb/a & -c/a & 1 \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & b/a & 1/a & 0 \\ 0 & (ad - bc)/a & -c/a & 1 \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & b/a & 1/a & 0 \\ 0 & 1 & -c/(ad-bc) & a/(ad-bc) \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & 0 & 1/a + bc/a(ad-bc) & -b/(ad-bc) \\ 0 & 1 & -c/(ad-bc) & a/(ad-bc) \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & 0 & ((ad-bc)+bc)/a(ad-bc) & -b/(ad-bc) \\ 0 & 1 & -c/(ad-bc) & a/(ad-bc) \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & 0 & d/(ad-bc) & -b/(ad-bc) \\ 0 & 1 & -c/(ad-bc) & a/(ad-bc) \end{array} \right]$$ If $a = 0$ and $ad - bc \ne 0$ we have $b\ne 0$ and $c\ne 0$ and it goes like this: $$\left[ \begin{array}{rr|rr} 0 & b & 1 & 0 \\ c & d & 0 & 1 \end{array} \right] \to \left[ \begin{array}{rr|rr} c & d & 0 & 1 \\ 0 & b & 1 & 0 \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & d/c & 0 & 1/c \\ 0 & 1 & 1/b & 0 \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & 0 & -d/cb & 1/c \\ 0 & 1 & 1/b & 0 \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & 0 & d/(-bc) & -b/(-bc) \\ 0 & 1 & -c/(-bc) & 0/(-bc) \end{array} \right] \to \left[ \begin{array}{rr|rr} 1 & 0 & d/(ad-bc) & -b/(ad-bc) \\ 0 & 1 & -c/(ad-bc) & 0/(ad-bc) \end{array} \right]$$

• Note that if $a=0$ and $ad-bc \neq 0$, then $c$ is not zero. Hence after interchanging rows, $c$ is in the position of $a$, and you can divide by $c$ instead. – Ian Jul 6 '15 at 22:59
• Hello Mvw, thanks very much for your answer. Whilst am still trying to fully and completely understand the inner processes of matrices, it is not because your answer is insufficient, but because it is in itself a very distinct area of study in mathematics, and I feel that your helpful insight is aiding my understanding in matrices. – Jim Jam Jul 10 '15 at 19:43

First of all, you can check that \begin{equation} \frac{1}{ad - bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} \begin{bmatrix} a & b \\ c & d \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \end{equation} which confirms that the matrix on the left is the inverse of $\begin{bmatrix} a & b \\ c & d \end{bmatrix}$ (when $ad - bc \neq 0$). The only question is how you would discover this formula for the inverse.

You could discover this formula just by guessing. If you try the simplest way to put zeros in the right positions, you will be on the right track. Another way to discover it might be to solve the system \begin{equation} \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x & y \\ z & w \end{bmatrix} =\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \end{equation} for the unknowns $x,y,z,w$. We have four equations and four unknowns and you could solve it by hand.

The method you are talking about is finding the inverse of a matrix A by computing the adjugate matrix :

https://en.wikipedia.org/wiki/Adjugate_matrix

This technique is very inefficient in practice for "big" matrix (4x4 or bigger), so it's more a theorical tool. In practice, you better use the gaussian elimination :

https://en.wikipedia.org/wiki/Gaussian_elimination#Finding_the_inverse_of_a_matrix

• Also in practice (like in scientific computing), there are many other methods for solving $Ax = b$, such as QR factorization and iterative methods (like the conjugate gradient method). – littleO Jul 6 '15 at 23:00
• This is all interesting but it doesn't answer the question. – David Richerby Jul 7 '15 at 15:45
• @DavidRicherby : isn't the demonstration in the first link an answer to "Why we swap values a and d? Why do c and b became negative? Why do we divide a, b, c and d by ad−bc?" : because you're computing $\frac{1}{Det(A)} adj(A) = A^{-1}$ – Tryss Jul 7 '15 at 15:49
• @Tryss We're not a link farm. The answer should be here on math.se, not on the other end of a link. – David Richerby Jul 7 '15 at 23:26

Given that the only thin you knwo about $A$ is that $D:=a d-b c\ne 0$ and you want to find $a',b',c',d'$ auch that (among others) $aa'+bc'=1$, trying $a'=\frac dD$ and $c'=-\frac cD$ might seem quite natural ...