Inverting a 3x3 matrix

3 views
Skip to first unread message

James Crook

unread,
Jun 18, 2011, 5:09:04 AM6/18/11
to L2learning
Following Nicole's post, we'd like to invert:

cos(t) 0 sin(-t)
0 2 0
sin(t) 0 cos(t)


If anyone knows how, could you give a hint - a hint that will help the
group to do it?

--James.

Jonathan Joo

unread,
Jun 18, 2011, 10:13:52 AM6/18/11
to l2lea...@googlegroups.com
Well, first off, we want to find

cos(t)  0  sin(-t)   a  b  c  1  0  0
0        2          0   X    d  e   f   =        0  1  0
sin(t)  0  cos(t)   g  h   i              0  0  1


So, couldn't we set up a system of equations to try and solve for the variables a, b, c, d, e, f, g, h, and i? Maybe start by substituting values of t. Not too sure though.
For example: a (cos(t) + g(sin(-t)) = 1 and so on. 

-Jonathan




From: James Crook <james....@gmail.com>
To: L2learning <l2lea...@googlegroups.com>
Sent: Saturday, June 18, 2011 5:09 AM
Subject: Inverting a 3x3 matrix

Shri Ganeshram

unread,
Jun 18, 2011, 10:52:53 AM6/18/11
to l2lea...@googlegroups.com
I think I know a way to do this, but it has been a while:

Let's call this matrix A; to compute it's inverse, we shall use the formula A^(-1)=adj(A)/det(A).

I won't do the tedious calculations, but in order to simplify things, use the formula sin^2 t + cos^2 t =1 when doing this by hand.

To find the adj matrix (adjoint matrix), we first find the cofactors of each element in the matrix and replace the element with the cofactor, alternating signs from positive to negative, back and forth; we then take the transpose of the resulting matrix.

A cofactor is the determinant of the matrix obtained when removing the row and column the element is in for that element.
Ex, if matrix B is a b c
                         d e f
                         g h i
The cofactor of a is the determinant of the matrix e f  or ei-fh
                                                                       h i
since that is the matrix obtained by discarding the row and column a is in.

So we are inserting these cofactors in a matrix with alternating signs

ex:
call the cofactors c1, c2,..., c9, corresponding to a,b,....i in matrix B from above.
We will enter the cofactors into a matrix like this:
+c1 -c2 +c3 
-c4 +c5 -c6
+c7 -c8 +c9

So let's do those two steps:

we have cofactors 2cost, 0, -2sint, 0, 1, 0, 2sint, 0, 2cost
we enter them into our matrix changing signs where necessary:
2cost (-)0  -2sint
(-)0       1   (-)0
2sint  (-)0 2cost

Now in order to get adjA, we must take this matrix and transpose it, aka for every row (i) make it column (i), so row1->col1, row 2-> col 2, etc

we get:
2cost  0  2sint
0        1   0
-2sint  0 2cost

and that is adjA!

Finally we divide adjA by the detA, which is 2, to get our inverse:
cost   0  sint
0       .5   0
-sint   0 cost

Done!
I hope this is all correct and that, furthermore, everyone understood it.
-Shri

James Crook

unread,
Jun 18, 2011, 11:32:09 AM6/18/11
to l2lea...@googlegroups.com
Jonathan, Shri,

Both are good answers, and the actual values Shri has come up with are correct - checked by multiplying by the original matrix.
We could also have used row operations, and good choices of multipliers, as outlined by Nicole and Shri.  


Would anyone like to follow up on Johnathan's approach, just take it a bit further?  When you get to multiplying out the second row, a lot of the equations become easy ones, and as things vanish it becomes much clearer what is really going on here.  


--James. 

Shri Ganeshram

unread,
Jun 18, 2011, 11:51:27 AM6/18/11
to l2lea...@googlegroups.com
You could do this the normal method,
cos(t)  0   sin(-t)  1  0 0
0        2          0  0  1 0
sin(t)   0   cos(t)  0  0 1
you just need to multiply by sin(t) and cos(t) and use the identity sin^2+cos^2=1 and other forms of it. It isn't too bad. Try using the identity and these factors to do it.

James Crook

unread,
Jun 18, 2011, 1:59:40 PM6/18/11
to l2lea...@googlegroups.com
Shri, 

Yes, that approach works too.

If you follow Jonathan's approach, it's easy to get that b,d,f and h are zero.
That leaves an equation involving a,c,g, and i.  and separately a trivial equation 2e=1.

This has split the 3x3 inverse into a 2x2 inverse and a 1x1 inverse.

So to sum up, we have four ways to tackle this problem:

1) Steam roller.  Calculating all the cofactors.
2) Solving for a,b,c,d,e,f,g,h,i and thanking our lucky stars so many values are zero.
3) Row operations.  (nice).
4) Spot that it is two separate problems in disguise, and solve each.

Quite probably the 4th way isn't clear yet.  The tell tale here is that the 2 in the matrix is all on its own - every other element in its rows and columns is zero.  If I asked you to find the inverse of:

a 0 b
0 7 0
c 0 d

You'd have a very similar situation - two separate problems, one solved by 1/7 and the other by inverting a 2x2 matrix.

--James.
Reply all
Reply to author
Forward
0 new messages