# Computing the inverse of a matrix without simultaneous equations

At school, we have been taught to compute the inverse of a ($2\times 2$) matrix by solving simulataneous equations in this way: Given $A=\left[\matrix{a&b\cr c&d}\right]$, let $A^{-1}=\left[\matrix{x&y\cr w& z}\right]$. Then $AA^{-1}=I_2$ where $I_2$ is the identity matrix.Then we can solve the simultaneous equations so obtained.

Can anyone also show a method which works for $n\times n$ matrices?

-
This method does work for $n \times n$ matrices. – littleO Nov 8 '13 at 3:05

For $2\times 2$ matrices, it'll probably be worthwhile to remember the inverse explicitly $$\begin{pmatrix}a & b \\ c & d\end{pmatrix}^{-1} = \frac{1}{ad-bc}\begin{pmatrix}d & -b \\ -c & a \end{pmatrix}$$ You'll recognize the term $ad-bc$ as the determinant of the $2\times 2$ matrix. This is generalized to $n\times n$ matrices as the adjugate matrix which takes advantage of the cofactor expansions associated with the determinant. The adjugate is more of a theoretical tool however, and there are quicker methods to calculate the inverse.

The quickest and easiest way to invert the matrix is generally to use Gaussian Elimination. Suppose we have an $n\times n$ matrix $A$ which we augment with the identity. Then as we row reduce $A$ to $I$, the same operations carry $I$ to some matrix $B$. You can show that $B$ is the inverse of $A$. $$\left(A\mid I\right) \longrightarrow \left(I\mid B\right),\ \ \ B=A^{-1}$$ This algorithm runs $\mathcal{O}(n^3)$. There are some computational details which can complicate the procedure (such as the matrix being ill-conditioned), but this is probably the most straight-forward solution overall.

-
I actually meant $n\times n$ matrices.For $2\times 2$,I computed it. Sorry for not being clear. – user54807 Jan 26 '13 at 6:31
@Worker Gaussian elimination seems to be the standard way of computing inverses. As a note, this is not really different from "solving" the system; Gaussian elimination was traditionally developed to solve systems of equations efficiently, moreover a matrix inverse is essentially the solution of a linear system encoded in matrix form. – EuYu Jan 26 '13 at 6:55

For $2\times 2$ matrix you can use the formula $$A^{-1}=\frac{1}{ad-bc}\begin{pmatrix} d& -b\\ -c & a \end{pmatrix}$$ which is easy to remember. There is no simple formula for $n\geq 3$ except for some special cases.

-

You can find the inverse of ANY NxN Matrix by augmenting it with an Identity matrix and putting the coordinate matrix in Reduce Echelon Form. The result will be a new identity matrix and the inverse of the coordinate Matrix. It works for ANY Square matrix.

-