Message Boards Message Boards


Why is this matrix multiplication not associative?

Posted 4 months ago
3 Replies
5 Total Likes

Apologies for the low quality of the attached image.

Presented is an attempt to calculate the product of six matrices of size 3x3. The product: {{1,0,0},{0,1,0},{0,0,9}}

I then split the multiplication into two halves: The product of the first half: {{1,0,0},{-1,1,0},{2,-4,1}} The product of the second half: {{1,4,0},{0,1,3},{0,0,9}}

Multiplying these two matrices yields {{1,4,0},{-1,-3,3},{2,4,-3}}, which is correct. This is in fact the matrix which I row reduced to obtain the six elementary matrices in the original product.

Is there a reason why Wolfram|Alpha is computing the first result?

Six matrices

First three

Second three

First three, second three combined


3 Replies

Taking a wild guess, the first one might be doing element-wise products rather than matrix multiplication.

That does make sense, thank you!

How might I "force" Wolfram to multiply normally? Moreover, why are the two smaller computations done normally?

Posted 4 months ago

Putting either a . or the word dot between each pair of matricies appears to make WolframAlpha perform matrix multiplication as you expect.

6 matricies with .

6 matricies with dot

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract