Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Matrices with Mathematica 5.1

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63333] Re: [mg63315] Matrices with Mathematica 5.1
  • From: gardyloo at mail.wsu.edu
  • Date: Sat, 24 Dec 2005 07:18:58 -0500 (EST)
  • References: <200512231008.FAA25936@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

  Hi,

    I'd try extracting the last column and then using LinearSolve on it:

m = {{1, 7, -2, 0, 8, -3}, {0, 0, 1, 1, 6, 5},
   {0, 0, 0, 1, 3, 9}, {0, 0, 0, 0, 0, 0}};

Needs["Statistics`DataManipulation`"]

In[9]:=
Column[m, -1]

Out[9]=
{-3, 5, 9, 0}

In[10]:=
s = Module[{}, v = Column[m, -1]; LinearSolve[m, v]]

Out[10]=
{-11, 0, -4, 9, 0, 0}

In[11]:=
m . s == v

Out[11]=
True

In[12]:=
$Version

Out[12]=
5.2 for Linux (June 20, 2005)


             Good luck,
                     C.O.



> 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.
>


  • Prev by Date: RealValued functions and derivatives
  • Next by Date: Re: What we from 1^Infinity, Infinity^0, and similar stuff
  • Previous by thread: Matrices with Mathematica 5.1
  • Next by thread: Re: Matrices with Mathematica 5.1