home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / sci / math / 14726 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  2.6 KB

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