Hi all,

I am just wondering how to get the inverse of a 3x3 matrix. My mathematics textbook just mention about the formula for getting inverse of a 2x2 matrix, but did not explain how is the theory behind the formula.

:rolleyes: Can anyone care to explain the concept to me? Thanks in advance.

I am just wondering how to get the inverse of a 3x3 matrix. My mathematics textbook just mention about the formula for getting inverse of a 2x2 matrix, but did not explain how is the theory behind the formula.

:rolleyes: Can anyone care to explain the concept to me? Thanks in advance.

Once, my maths teacher mentioned this in 5 minutes.

maybe it's

| a1.x+b1.y+c1.z=d1

| a2.x+b2.y+c2.z=d2

| a3.x+b3.y+c3.z=d3

we know the a,b,c, and d and we search x, y and z. Matrices, she said, make it easier for

this can be represented as a 4x3 matrix.

a 3x3 matrix will have this:

| a1.x+b1.y=c1

| a2.x+b2.y=c2

| a3.x+b3.y=c3

so, we have only 2 unknown values (x and y)

we already know a1,a2,a3 , b1,b2,b3, c1,c2,c3 .

maybe it's

| a1.x+b1.y+c1.z=d1

| a2.x+b2.y+c2.z=d2

| a3.x+b3.y+c3.z=d3

we know the a,b,c, and d and we search x, y and z. Matrices, she said, make it easier for

*computers*to find x,y and z.this can be represented as a 4x3 matrix.

```
```

+---------------+

| a1 b1 c1 | d1 |

| a2 b2 c2 | d2 |

| a3 b3 c3 | d3 |

+---------------+

a 3x3 matrix will have this:

| a1.x+b1.y=c1

| a2.x+b2.y=c2

| a3.x+b3.y=c3

so, we have only 2 unknown values (x and y)

we already know a1,a2,a3 , b1,b2,b3, c1,c2,c3 .

Hi all,

I am just wondering how to get the inverse of a 3x3 matrix. My mathematics textbook just mention about the formula for getting inverse of a 2x2 matrix, but did not explain how is the theory behind the formula.

:rolleyes: Can anyone care to explain the concept to me? Thanks in advance.

the inverse multiplied by the original should give the unit/identity matrix. i.e., M'M=I

basically, you solve for the cross product that results in the unit matrix (the "theory", i guess). In the end, it works out to:

(1/|M|) =I

Where T is the transpose of the co-factor matrix. The co-factor matrix is the following: (Imagine the following is in a big matrix square bracket):

+|minor 1,1| -|minor 2,1| +|minor 3,1| -|minor 4,1| etc

- |minor 1,2| +|minor 2,2| -|minor 3,2| +|minor 4,2| etc

+|minor 1,3| -|minor 2,3| +|minor 3,3| -|minor 4,3| etc

etc

Note the alternating signs of the co-efficients. Take the transpose of the following (exchange A11 /w A11, A12 /w A21, A13 /w A31, etc)

Hope this helps...

another method:

transform your matrix A into the unit matrix by

- exchanging rows

- multiplying rows by a scalar value

- adding a multiple of one row to another

while also applying each of these operations on a unit matrix E.

the resulting matrix E' is the inverse of A.

transform your matrix A into the unit matrix by

- exchanging rows

- multiplying rows by a scalar value

- adding a multiple of one row to another

while also applying each of these operations on a unit matrix E.

the resulting matrix E' is the inverse of A.

Definitions:

Det(A) = Determinant of A

Adj(A) = Adjoint of A

C(A) = Co-factor matrix

Determinants in 2x2 is Area, 3x3 is Volume, 4x4 -> is twisted to think about ;)

I will assume you know how to get the determinant from other theory.

Cofactor Matrix is kinda hard to explain. For each position in the matrix you use the rest of the matrix to find a new "cofactor" for that position. However, the row and column to which the point your finding the co-factor for is not used:

Say for the C22 ( row 2, col 2 ), which is currently 5. To find the cofactor for this location the following steps are:

The cofactor matrix terms are:

C11 = (-1)^(1-1) * [ -2 ] = 1 * -2 = -2

C12 = (-1)^(1-2) * [ -3 ] = -1 * -3 = 3

C21 = (-1)^(2-1) * [ 5 ] = -1 * 5 = -5

C22 = (-1)^(1-1) * [ 2 ] = 1 * 2 = 2

Putting it into a C(A):

Now Transposing it becomes Adj(A)=

This is now the form that your rule of thumb 'algorithm' shows (toggle the identity positions, and negate the non-identity positions). The reality of it all is its a rule of thumb template specific to 2x2 matrixies.

The rest is as you probably know (1/Det(A)) forms a factor to multily the Adj(A) matrix against. In this case the Det(A) = (-2*2) - (3*-5) = 11

Now Inv(A) = 1/11 * Adj(A) =

This method will work on *all* matrixes able to be inversed, however, the bigger the matrix the more work is involved. There are simpler ways using factorization. Mainly the LU decompositoin will reduce 2/3rds of the CPU work. In essence it will factor the matrix A into an Upper(A) and Lower(A) triangular matries. Once done, you save them for any future Inv(A) uses, since the over head in get them is already done. It become a basic 2 set process which doenst take alot of cpu overhead:

If LU(A) produces Upr(A) and Lwr(A): Ax=b --> Lwr(A) * Upr(A) = A

Step one, find the intermediate vector 'z'. Lwr(A) is triangluar and in Row Eschelon form, so the answer is iterative (no matrix math is needed):

Lwr(A) * z = b

Now with z we can find x = Inv(A) * b. Again Upr(A) is triangler and hence in row eschelon form, so its solution is also iterative!

Upr(A) * x = z

Using this method, once the Upr(A) and Lwr(A) is found, its simple to iterate a solution for x! Even better, as i hinted above, if b were to change to say c, you can use the save Upr(A) and Lwr(A) to solve for x again! Simply change b->c in the first itteration using the Lwr(A) triangular matrix.

Software simulators like SPICE use engines similar to this to solve circuits etc.

I can explain more later if you need to know this.

Hoped it helped ;)

:NaN:

Det(A) = Determinant of A

Adj(A) = Adjoint of A

C(A) = Co-factor matrix

Determinants in 2x2 is Area, 3x3 is Volume, 4x4 -> is twisted to think about ;)

I will assume you know how to get the determinant from other theory.

Cofactor Matrix is kinda hard to explain. For each position in the matrix you use the rest of the matrix to find a new "cofactor" for that position. However, the row and column to which the point your finding the co-factor for is not used:

```
A =
```

1 2 3

4 5 6

7 8 9

Say for the C22 ( row 2, col 2 ), which is currently 5. To find the cofactor for this location the following steps are:

- [*]Ignore row 2 and col 2.

[*]Build an equivalent 2x2 matrix with the row / col removed

```
1 3
```

7 9

- [*]Find the determinant of this. Det(A) = 1*9 - 3*7 = -12

[*]Multiply the result by the equation (-1)^(m-n) where m is the row and n is the col. So (-1)^(2-2) = 1. Then C22 = -12.

Simularily, C12 (row 1, col 2) is = (-1)^(1-2) * [ 4*9 - 7*6 ] = - [ 36-42] = 6

Adj(A) is the transpose of the Cofactor matrix: Adj(A) = [ C(A) ]' . That is a 2x4 matrix will flip along its identity pivots points, and form a 4x2 matrix. However, for a successful inverse matrix, it should always be a square matrix (3x3, 2x2, etc)

Finally the Inverse Matrix is defined as: Adj(A)/Det(A)

To show this, your 2x2 matrix equation your talking about can be shown with the above info. Here is a matrix example:

```
A =
```

2 5

-3 -2

The cofactor matrix terms are:

C11 = (-1)^(1-1) * [ -2 ] = 1 * -2 = -2

C12 = (-1)^(1-2) * [ -3 ] = -1 * -3 = 3

C21 = (-1)^(2-1) * [ 5 ] = -1 * 5 = -5

C22 = (-1)^(1-1) * [ 2 ] = 1 * 2 = 2

Putting it into a C(A):

```
```

-2 3

-5 2

Now Transposing it becomes Adj(A)=

```
```

-2 -5

3 2

This is now the form that your rule of thumb 'algorithm' shows (toggle the identity positions, and negate the non-identity positions). The reality of it all is its a rule of thumb template specific to 2x2 matrixies.

The rest is as you probably know (1/Det(A)) forms a factor to multily the Adj(A) matrix against. In this case the Det(A) = (-2*2) - (3*-5) = 11

Now Inv(A) = 1/11 * Adj(A) =

```
```

-0.1818 -0.4545

0.2727 0.1818

This method will work on *all* matrixes able to be inversed, however, the bigger the matrix the more work is involved. There are simpler ways using factorization. Mainly the LU decompositoin will reduce 2/3rds of the CPU work. In essence it will factor the matrix A into an Upper(A) and Lower(A) triangular matries. Once done, you save them for any future Inv(A) uses, since the over head in get them is already done. It become a basic 2 set process which doenst take alot of cpu overhead:

If LU(A) produces Upr(A) and Lwr(A): Ax=b --> Lwr(A) * Upr(A) = A

Step one, find the intermediate vector 'z'. Lwr(A) is triangluar and in Row Eschelon form, so the answer is iterative (no matrix math is needed):

Lwr(A) * z = b

Now with z we can find x = Inv(A) * b. Again Upr(A) is triangler and hence in row eschelon form, so its solution is also iterative!

Upr(A) * x = z

Using this method, once the Upr(A) and Lwr(A) is found, its simple to iterate a solution for x! Even better, as i hinted above, if b were to change to say c, you can use the save Upr(A) and Lwr(A) to solve for x again! Simply change b->c in the first itteration using the Lwr(A) triangular matrix.

Software simulators like SPICE use engines similar to this to solve circuits etc.

I can explain more later if you need to know this.

Hoped it helped ;)

:NaN:

Hey Nan, Tola, jademtech and Ultrano,

Thanks for explaining to me. :)

Anyway would you mind explaining to me what are the applications of matrix? Thanks in advance.

Thanks for explaining to me. :)

Anyway would you mind explaining to me what are the applications of matrix? Thanks in advance.

There are *many* uses for matrixies... you name it really. Any system with multiple equations describing it. Force/vector calculations, network trafic anaylsis, *electronics simulations*, graphics (3d perspectives), etc. etc. etc.

Not hard to find when you think about it..

As for the LU decomposition, you can find a good Page here:

http://www.uni-bonn.de/~manfear/matrix_lu.php

As well at the bottom (last link) has a good tutorial with a solved example to help you walk thru the math. Dont get all freaked out by the SUM's its not really that bad.. ;)

:NaN:

Not hard to find when you think about it..

As for the LU decomposition, you can find a good Page here:

http://www.uni-bonn.de/~manfear/matrix_lu.php

As well at the bottom (last link) has a good tutorial with a solved example to help you walk thru the math. Dont get all freaked out by the SUM's its not really that bad.. ;)

:NaN: