Re: Matrices with Mathematica 5.1

*To*: mathgroup at smc.vnet.net*Subject*: [mg63324] Re: [mg63315] Matrices with Mathematica 5.1*From*: Pratik Desai <pdesai1 at umbc.edu>*Date*: Sat, 24 Dec 2005 07:18:50 -0500 (EST)*References*: <200512231008.FAA25936@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

drizkol wrote: >I would like to solve the system given by: > >[1 7 -2 0 -8 -3] >[0 0 1 1 6 5] >[0 0 0 1 3 9] >[0 0 0 0 0 0] > >Where the matrix is a typical matrix in the form x1+x2+...+xn = b where >b is the last item in the row. For example, row 1 could be written as >x1 + 7x2 - 2x3 -8x4 = -3. How could I get mathematica to solve this >matrix? I understand how to build a matrix, I just need to know the >operation to run on it. I tried to use LinearSolve but I did something >wrong. Is there a built-in operation to solve these matrices? If so, >please tell. Thanks. > > > Here is my attempt using PseudoInverse mata = {{1, 7, -2 , 0, -8, -3}, {0, 0, 1, 1, 6, 5}, {0, 0, 0, 1, 3, 9}, {0, 0, 0, 0, 0, 0}} rhs = Table[mata[[q]][[6]], {q, 1, 4}] matb = Table[Most[mata[[q]]], {q, 1, 4}] ans = PseudoInverse[matb].rhs Hope this helps Pratik -- Pratik Desai ...Moderation, as well as Regularity of Thinking, so much to be wished for in the Heads of those who imagine they come into the World only to watch and govern it?s Motion Gulliver's Travels by Jonathan Swift

**References**:**Matrices with Mathematica 5.1***From:*"drizkol" <drizkol@gmail.com>