Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Gaussian elimination



Larry Smith wrote:

At 9:17 AM -0500 3/1/01, Bob Muir wrote:
I might have missed earlier parts of the thread.
If you are talking about solving simultaneous equations or simply
matrix inversion (involving numeric values), Excel has excellent
matrix funtions built in. It makes solving simultaneous equations a
snap.

I've tried to invert matrices in Excel, but instead of a 3x3 array as the
result it gives only one cell. Please repeat your instructions for matrix
inversion in Excel and I'll try it again.

TIA,
Larry


I've never done this before in Excel, but I searched for the word
"matrix" in Excel's help, and walked through the explanations and
examples. It seems fairly straightforward. Here are the steps
as I see it:

1. Create a matrix by entering values in the spreadsheet: lay
out the elements in rows and columns just as you want them
to appear visually.

2. Optionally highlight the matrix and give it a name by then
typing the name in the "Name Box" -- the white rectangular
entry field with drop-down arrow just above column A of the
spreadsheet.

3. Select the group of cells where the inverse matrix will
appear. Optionally give this area a name, too.

4. Enter the function in the formula bar, using as argument
the area where your original matrix appears (or the name
of the area). E.g.,

Type: =MINVERSE(mat1) /* named area */
or: =MINVERSE(A2:C4) /* unnamed area */

5. Hit <Ctrl-Shift-Enter>.

Note: This last step tells Excel that the formula is being
used as an "array formula". If omitted, Excel only puts your
formula in the first cell of the selected block, and copying
it into the rest of the block does not work.

There are also functions for matrix multiplication, transposing
a matrix, and finding the determinant:

=MMULT(A2:C4,E2:G4) or =MMULT(mat1,mat2)

=TRANSPOSE(A2:C4) or =TRANSPOSE(mat1)

=MDETERM(I2:K4) or =MDETERM(mat1)

(Since MDETERM is not an array formula, don't hit <Ctrl-Shift-Enter>
for this last case.)

Enjoy / G`uu!

Ken Caviness <caviness@southern.edu>
Physics, Southern Adventist University
Collegedale, TN 37315