Live data from Hacker News

Visualizing matrix multiplication as a linear combination

eli.thegreenplace.net

1–10 of 30 posts

Re: Visualizing matrix multiplication as a linear combination

#4
Hmm. As someone who has never understood/visualized/been taught matrix multiplication in any other way than how it's shown on the linked page, could someone explain the alternative? I.e., if this is new, what mental model do you currently have? Presumably that one would be new and useful for me.

Edit: "Typically this visualization isn't taught" -- that's what I"m asking. What visualization were you taught, if not this one? I can't think of any other that makes any sense.

Re: Visualizing matrix multiplication as a linear combination

#5
post #4

Hmm. As someone who has never understood/visualized/been taught matrix multiplication in any other way than how it's shown on the linked page, could someone explain the alternative? I.e., if this is new, what mental model do you currently have? Presumably that one would be new and useful for me. Edit: "Typically this visualization isn't taught" -- that's what I"m asking. What visualization were you taught, if not thi…

I think this page is meant for someone who has no mental model of matrix multiplication at all and just applies the formula blindly.

Re: Visualizing matrix multiplication as a linear combination

#6
post #4

Hmm. As someone who has never understood/visualized/been taught matrix multiplication in any other way than how it's shown on the linked page, could someone explain the alternative? I.e., if this is new, what mental model do you currently have? Presumably that one would be new and useful for me. Edit: "Typically this visualization isn't taught" -- that's what I"m asking. What visualization were you taught, if not thi…

I was taught to go element-by-element: element c_ij of the product = the linear combination a_ik*b_kj. What's presented here is the "same" but represents a higher level of abstraction, so that you think in terms of linear combinations of rows or columns, rather than linear combinations of scalars.

Re: Visualizing matrix multiplication as a linear combination

#7
post #4

Hmm. As someone who has never understood/visualized/been taught matrix multiplication in any other way than how it's shown on the linked page, could someone explain the alternative? I.e., if this is new, what mental model do you currently have? Presumably that one would be new and useful for me. Edit: "Typically this visualization isn't taught" -- that's what I"m asking. What visualization were you taught, if not thi…

Typically, this visualization isn't taught, in my experience. What's taught is the formula for computing each cell of the result matrix (cell i,j being the dot product of row i of the first matrix with column j of the second). While this is, of course correct, and also the most efficient way to compute the multiplication manually, it's not always clear why the formula is correct.

Hopefully the visualization on the linked page makes this formula's origin clear.

Re: Visualizing matrix multiplication as a linear combination

#8
post #2

This is the way I "understood" linear algebra. I even encoded it here in a small c++ header file when I used to think it wise to implement these things yourself: https://github.com/arithma/mat44/blob/master/mat44.h Used here: https://github.com/arithma/ios3dball

> when I used to think it wise to implement these things yourself

It's a very good thing that you thought it wise at some point. There's nothing like reinventing a few fundamental wheels for a better understanding of how they work.

Re: Visualizing matrix multiplication as a linear combination

#9
post #4

Hmm. As someone who has never understood/visualized/been taught matrix multiplication in any other way than how it's shown on the linked page, could someone explain the alternative? I.e., if this is new, what mental model do you currently have? Presumably that one would be new and useful for me. Edit: "Typically this visualization isn't taught" -- that's what I"m asking. What visualization were you taught, if not thi…

You usually think of the product of a matrix with a vector as the matrix acting on the vector, i.e. every row of the matrix tells you what the corresponding component of the resulting vector is. This turns the thing on its head and describes the result as the vector acting on the matrix. Because you usually use matrices to describe operations, e.g. transformations like translations or rotations in (computer) geometry or observables in quantum physics, it seem more natural to think of the matrix as acting on the vector, i.e. a point of the geometry or a physical state, not the other way round.

Re: Visualizing matrix multiplication as a linear combination

#10
post #4

Hmm. As someone who has never understood/visualized/been taught matrix multiplication in any other way than how it's shown on the linked page, could someone explain the alternative? I.e., if this is new, what mental model do you currently have? Presumably that one would be new and useful for me. Edit: "Typically this visualization isn't taught" -- that's what I"m asking. What visualization were you taught, if not thi…

I was taught by the an other visualization[1]. I thought it was the "standard" method since many textbooks (in Hungary at least) teach it this way.

[1] https://upload.wikimedia.org/wikipedia/commons/e/eb/Matrix_m...

Post reply on HN