Message Boards Message Boards

0
|
6451 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Create a row echelon form of a matrix with a mix of numbers and strings?

Posted 8 years ago

A matrix with numbers and strings to row echelon form? See attached.

A.Geera

Attachments:
POSTED BY: Chiel Geeraert
4 Replies
Posted 8 years ago

Thank you very much !

Best regards, Chiel Geeraert (Netherlands)

POSTED BY: Chiel Geeraert
Posted 8 years ago

Thank you for your answer. I am new to this site. But what I do not understand is why my studybook gives as echelon form the form with the "a-4/3" and Mathematica gives with RowReduce something without the a ????.

Where is the "a" in Mathematica now ? I do not understand what Mathematica is doing ? Can you help me ?

Best regards A.Geeraert

POSTED BY: Chiel Geeraert

RowReduce produces the reduced row echelon form, which means pivots will be 1; this happens by dividing whatever had been in a pivot position by itself. Also it zeroes entries above pivots.

I cannot say what the textbook might be doing. You can get something similar using LUDecomposition.

In[3]:= matA = {{1, 1, 1, 1}, {2, -1, 2, 1}, {1, 2, 1, a}};

In[14]:= Quiet[lu = LUDecomposition[matA][[1]]]

Out[14]= {{1, 1, 1, 1}, {2, -3, 0, -1}, {1, -(1/3), 0, -(4/3) + a}}

In[15]:= u = lu*Normal[SparseArray[{i_, j_} /; j >= i -> 1, {3, 4}]]

Out[15]= {{1, 1, 1, 1}, {0, -3, 0, -1}, {0, 0, 0, -(4/3) + a}}

To repeat myself, put needed code in the question. Only attach a notebook if the code is too large.

POSTED BY: Daniel Lichtblau

(1) Please post actual code. There is no need to attach a notebook for a small example such as this.

(2) The result is correct.

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract