home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!tcsi.com!iat.holonet.net!psinntp!psinntp!kepler1!andrew
- From: andrew@rentec.com (Andrew Mullhaupt)
- Newsgroups: sci.math
- Subject: Re: 4x4 matrix
- Keywords: matrix detrminant invers
- Message-ID: <1319@kepler1.rentec.com>
- Date: 10 Nov 92 03:30:15 GMT
- References: <2054@tfd.tfd.com>
- Organization: Renaissance Technologies Corp., Setauket, NY.
- Lines: 51
-
- In article <2054@tfd.tfd.com> bret@tfd.COM (Bret Weinraub) writes:
- >Help!
-
- [e-mail unavailable]
-
- >
- >I have the following problem. Any input on how to solve it is greatly
- > job: Invert the following matrix
- >
- > 3 4 1 8
- > 1 1 2 0
- > [A] = 2 7 3 7
- > 1 0 6 5
-
- > formula 1) first find the determinant of A (det A)
- > 2) to get the inverse, the formula is (1/det A) * [A]
-
- Let's not and say we did. For many reasons, this approach to inversion
- is better left alone. There are many simple and effective ways of computing
- the inverse, and if you do lots of this kind of stuff you want to study
- linear algebra and then perhaps some numerical analysis. To get a quick answer
- to this question, you might use some machine to calculate it, or better yet,
- you can calculate it as follows. Write down your matrix next to a 4x4 identity
- matrix:
-
-
- 3 4 1 8 | 1 0 0 0
- 1 1 2 0 | 0 1 0 0
- 2 7 3 7 | 0 0 1 0
- 1 0 6 5 | 0 0 0 1
-
-
- Now the object is to apply row operations to the two matrices so that the left
- side becomes the identity - the right hand side will be the desired inverse.
- By row operations, I mean you take a row in the matrix and subtract some
- constant multiple of it from another row, possibly itself. Notice that this
- includes just multiplying any row by some constant. You do the same operation
- on both sides at once. You decide what operation to do by trying to get the
- zeros and ones in the right places on the left side. You can make this into an
- algorithm by first multiplying a row by the reciprocal of it's element in the
- same column of the right hand side and then successively 'eliminating' the
- nonzero elements in each row of that column. You do this once for each row
- and you should be done. For more on this, look up "Gauss-Jordan Elimination"
- (and you can find it in that ubiquitous tome _Numerical Recipes_. Note that
- Gauss-Jordan is not the best way to invert a matrix, nor is inversion the
- best way to solve linear equations, and in the final analysis _Numerical
- Recipes_ is not the ultimate authority on the subject. Your milage may vary.
-
- Later,
- Andrew Mulhaupt
-
-