Message Boards Message Boards

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

Why the multiplication between two matrix is wrong?

Posted 10 years ago

I did the multiplication in paper and the result is different and I made it too in other software and the result is the same that I made in paper enter image description here

POSTED BY: Juan Gomez
4 Replies

In[35]:= l = {{1, 0, 0, 0}, {3, 1, 0, 0}, {2, 4, 1, 0}, {5, 2, 3, 1}};

In[36]:= u = {{1, 9, 7, 5}, {0, 1, 8, 5}, {0, 0, 1, 2}, {0, 0, 0, 1}};

In[37]:= l .u

Out[37]= {{1, 9, 7, 5}, {3, 28, 29, 20}, {2, 22, 47, 32}, {5, 47, 54, 42}}

POSTED BY: Kay Herbert

Try L.U for the matrix product instead of L*U which does element-wise multiplication.

POSTED BY: Ilian Gachevski

It would help if you posted your code in <> so we can copy it. what result did you get doing it by hand and what did you get in Mathematica?

POSTED BY: Kay Herbert
Posted 10 years ago
L = {{1, 0, 0, 0}, {3, 1, 0, 0}, {2, 4, 1, 0}, {5, 2, 3, 1}}
U = {{1, 9, 7, 5}, {0, 1, 8, 5}, {0, 0, 1, 2}, {0, 0, 0, 1}}
L*U
{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}

This is the result that give me in the other software enter image description here

POSTED BY: Juan Gomez
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