# 5. Finding the Inverse of a Matrix

by M. Bourne

### What are we doing?

If we multiply matrix* A *by the **inverse** of matrix *A*, we will get the **identity** matrix, *I*.

The concept of solving systems using matrices is similar to the concept of solving simple equations.

For example, to solve 7*x* = 14, we multiply both sides by the same number. We find the "inverse" of `7`, which is `1/7`. Multiplying both sides on the left by `1/7` gives:

`(1/7) × 7x = (1/7) × 14`

On the **left**, we have (in part):

`(1/7) × 7 = 1`

The number `1` is the "identity" for multiplication of ordinary numbers. On the **right**, we get:

`1/7 xx 14 = 2`.

The solution for our equation is:

x= 2

We extend this concept of finding an inverse for solving a single equation, to solving systems of simultaneous equations.

We need to find inverses of matrices so that we can solve systems of simultaneous equations.

(We'll see how to solve systems in the next section, Matrices and Linear Equations).

We'll find the inverse of a matrix using 2 different methods. You can decide which one to use depending on the situation.

The first method is limited to finding the inverse of 2 × 2 matrices. It involves the use of the determinant of a matrix which we saw earlier.

**Reminder: **We can only find the determinant of a **square** matrix. For example, if *A* is the square matrix

`((2,3),(-1,5))`

then we can find the **determinant of** * A*:

`|(2,3),(-1,5)|=10+3=13`

For convenience, we could have written the determinant of matrix `A` as `|A|` and so our final answer would be:

`|A| = 13`

Another way of writing the same thing is to use "det" for "determinant". So for example, in this case we would write:

`det(A) = 13`

## Method 1 - Transposing and Determinants

This method is only good for finding the inverse of a 2 × 2 matrix.

We'll see how this method works via an example.

### Example

Find the inverse, `A^-1`, of

`A=((2,-3),(4,-7))`

using Method 1.

Answer

Method 1 is as follows.

[1] Interchange leading diagonal elements:

`-7 → 2`; `2 → -7`

`((-7,-3),(4,2))`

[2] Change signs of the other 2 elements:

`-3 → 3`; `4 → -4`

`((-7,3),(-4,2))`

[3] Find the determinant `|A|`

`|(2,-3),(4,-7)|=-14+12=-2`

[4] Multiply result of [2] by `1/|A|`

`A^-1 = 1/|A|((-7,3),(-4,2))`

`=1/(-2)((-7,3),(-4,2))`

`=((3.5,-1.5),(2,-1))`

So we have found the inverse, as required.

### Is it correct?

We check by multiplying our inverse by the original matrix. If we get the identity matrix (*I*) for our answer, then we must have the correct answer.

`A^-1A=((3.5,-1.5),(2,-1))((2,-3),(4,-7))`

`=((7-6,-10.5+10.5),(4-4,-6+7))`

`=((1,0),(0,1))`

`=I`

We can go to bed happy, knowing that our answer is correct.

## Method 2 - Adjunct Matrix (can be extended to any size)

NOTE: I have left Method 2 here for historical reasons. We will be using computers to find the inverse (or more importantly, the solution for the system of equations) of matrices larger than 2×2.

If you need to find the inverse of a 3×3 (or bigger) matrix using paper, then follow the steps given. It is tedious, but it will get you there. Good luck.

Method 2 uses the **adjoint matrix**
method.

[Warning: This is long - and ancient history!]

Answer

#### Method 2 (an example of dinosaur mathematics - should be extinct)

The inverse of a 3×3 matrix is given by:

`A^-1=("adj"A)/(detA)`

"adj* A*" is short for "the adjoint of *A*". We use cofactors (that we met earlier) to
determine the **adjoint** of a matrix.

#### Cofactors

**Recall: **The **cofactor** of an
element in a matrix is the value obtained by evaluating the
determinant formed by the elements not in that particular row or
column.

### Example 2a

Consider the matrix:

`((5,6,1),(0,3,-3),(4,-7,2))`

The cofactor of 6 is

`|(0,-3),(4,2)|=0+12=12`

The cofactor of -3 is

`|(5,6),(4,-7)|=-35-24=-59`

We find the **adjoint matrix** by replacing
each element in the matrix with its cofactor and applying a + or
- sign as follows:

`((+,-,+),(-,+,-),(+,-,+))`

and then finding the **transpose** of the
resulting matrix. The transpose means the 1^{st} column becomes the 1^{st}
row; 2^{nd} column becomes 2^{nd}
row, etc.** **

### Example 2b

Find the inverse of the following by using the adjoint matrix method:

`A=((5,6,1),(0,3,-3),(4,-7,2))`

#### Solution

**Step 1**:

Replace elements with cofactors and apply + and -

`((+(-15),-(12),+(-12)),(-(19),+(6),-(-59)),(+(-21),-(-15),+(15)))`

`=((-15,-12,-12),(-19,6,59),(-21,15,15))`

**Step 2**

Transpose the matrix:

`"adj"A = ((-15,-19,-21),(-12,6,15),(-12,59,15))`

Before we can find the **inverse** of matrix *A*, we need det *A:*

`|(5,6,1),(0,3,-3),(4,-7,2)|` `=5(-15)+4(-21)` `=-159`

Now we have what we need to apply the formula

`A^-1=("adj"A)/detA`

So

`A^-1=("adj"A)/detA`

`=1/-159((-15,-19,-21),(-12,6,15),(-12,59,15))`

`A^-1=((0.094,0.119,0.132),(0.075,-0.038,-0.094),(0.075,-0.371,-0.094))`

### Example 2c

Find the inverse of

`((-2,6,1),(0,3,-3),(4,-7,3))`

using Method 2.

**Solution**

`text(C of) A` `=((+(-12),-(12),+(-12)),(-(25),+(-10),-(-10)),(+(-21),-(6),+(-6)))`

`=((-12,-12,-12),(-25,-10,10),(-21,-6,-6))`

Interchange rows and columns:

`"adj"A=((-12,-25,-21),(-12,-10,-6),(-12,10,-6))`

`"det"A`

`=|(-2,6,1),(0,3,-3),(4,-7,3)|`

`=2(9-21)+4(-21)`

`=-60`

So

`A^-1=("adj"A)/(detA)`

`=1/-60((-12,-25,-21),(-12,-10,-6),(-12,10,-6))`

`=( (1/5,5/12,7/20),(1/5,1/6,1/10),(1/5,-1/6,1/10))`

`=((0.2,0.417,0.35),(0.2,0.167,0.1),(0.2,-0.167,0.1))`

### Using a computer to find matrix inverses

Now let's see how to do all this more appropriately using a computer...

Easy to understand math videos:

MathTutorDVD.com

## Inverses of Larger Matrices (Method 3)

Most **real** systems of equations are very large (up to 100 by 100 is common). We use computers to find these inverses. You need to **understand** what to give the computer and what it will give you as an answer.

However, some people need to know how to find inverses of large matrices!

See Inverse of a Matrix Using Gauss-Jordan Elimination for the most common method for finding inverses.

### Exercise

Find the inverse of

`((7,-2),(-6,2))`

by Method 1.

(I believe this is the level of inverse we should do on paper, so we get a sense of what an inverse is and how it may be calculated. Anything bigger than this should be done using computer :-)

Answer

[1] Interchange leading diagonal elements:

`((2,-2),(-6,7))`

[2] Change signs of the other 2 elements:

`((2,2),(6,7))`

[3] Find |*A*|

Remember that our original matrix (from the question) is

`A=((7,-2),(-6,2))`

So the determinant of *A *is given by:

`|A|=|(7,-2),(-6,2)|=14-12=2`

[4] Multiply result of [2] by `1/|A|`

`A^-1=1/(|A|)((2,2),(6,7))`

`=1/2((2,2),(6,7))`

`=((1,1),(3,3.5))`

Is it correct?

**Check:**

`A^-1A=((1,1),(3,3.5))((7,-2),(-6,2))`

`=((7-6,-2+2),(21-21,-6+7))`

`=((1,0),(0,1))`

`=I`

Let's now see some examples of products and inverses of matrices.

### Search IntMath, blog and Forum

### Online Algebra Solver

This algebra solver can solve a wide range of math problems.

Go to: Online algebra solver

### Algebra Lessons on DVD

Math videos by MathTutorDVD.com

Easy to understand algebra lessons on DVD. See samples before you commit.

More info: Algebra videos

### The IntMath Newsletter

Sign up for the free **IntMath Newsletter**. Get math study tips, information, news and updates each fortnight. Join thousands of satisfied students, teachers and parents!