News for hackers. Stuff that matters.
Re:Matrix Multiplication by laszlokorte on Monday January 17, 2022 @07:46PM (#29973486)
The animation looks really neat but I did not find it very helpful from an pedagocical perspective which is why I built an alternative version inspired by OP. [1]

/edit: I just noticed the OP is built by andrestaltz with Cycle.js. Cycle is a really nice reactive programming js framework that is very great to work with.

[1]: https://static.laszlokorte.de/matrix-multiplication/

Re:Matrix Multiplication by Nevermark on Monday January 17, 2022 @11:52PM (#29975262)
I like it!

If you put matrix B over (or under) the Result matrix, the relationship between rows in A, columns in B, and elements in Result would be even more directly visualized.

You could even show the intermediate products to be summed as a diagonal between matrices A and B as you step through them. Also with direct visual alignment.

Re:Matrix Multiplication by anilakar on Tuesday January 18, 2022 @03:06AM (#29976394)
> If you put matrix B over (or under) the Result matrix, the relationship between rows in A, columns in B, and elements in Result would be even more directly visualized.

This is the way I multiply matrices on paper - it's a lot easier to keep track of the current row and column that way.

Re:Matrix Multiplication by laszlokorte on Tuesday January 18, 2022 @06:21AM (#29977625)
I added an option for that.
Re:Matrix Multiplication by carbocation on Monday January 17, 2022 @09:11PM (#29974143)
This is a nice visualization. Although visually obvious, it might be nice to also show the matrix dimension adjacent to or beneath the Matrix A and Matrix B labels.
Re:Matrix Multiplication by laszlokorte on Monday January 17, 2022 @09:18PM (#29974189)
Thanks for the idea! I added that :)
Re:Matrix Multiplication by carbocation on Monday January 17, 2022 @09:25PM (#29974250)
This is great! I think if you swap the order to show (row x column) you'll help people grasp the intuition behind the need for matching up Matrix A's column count with Matrix B's row count.
Re:Matrix Multiplication by rustybolt on Tuesday January 18, 2022 @03:50AM (#29976677)
Yes, I wanted to comment that it's just taking dot products of the rows of the left matrix and the columns of the right one. That's also more easy to understand since there's just one thing going on at a time, and you don't have to move, flip and overlay matrices. This is nice to animate but almost impossible to do in your head.
Re:Matrix Multiplication by eigenvalue on Monday January 17, 2022 @09:53PM (#29974448)
I agree, your version is much better and a lot less confusing.
Re:Matrix Multiplication by dandellion on Tuesday January 18, 2022 @05:28AM (#29977256)
I'd be really nice if it could be parametrized so I could bookmark a specific size, like say https://static.laszlokorte.de/matrix-multiplication/?size=2x....
Re:Matrix Multiplication by laszlokorte on Wednesday January 26, 2022 @01:44PM (#30089865)
Thanks for your suggestion. I Now added a share link at the allows you to share/bookmark the full state (size, cells, step)
Re:Matrix Multiplication by JetAlone on Tuesday January 18, 2022 @02:42AM (#29976267)
I like both of them. I think yours is definitely more comprehensive and robust as a teaching tool, but there is something cool about watching the matrices overlay each other in a smooth transition.
Re:Matrix Multiplication by dataangel on Monday January 17, 2022 @10:47PM (#29974845)
Your version has the left most term cut off on Android mobile, the page wants to center too far to the left to see it for some reason.
Re:Matrix Multiplication by laszlokorte on Monday January 17, 2022 @11:10PM (#29974985)
Thank you for your feedback. Should be fixed now :)
Re:Matrix Multiplication by cwilby on Monday January 17, 2022 @11:38PM (#29975178)
This cleared up matrix multiplication after a long period of interest/confusion around the subject, great work and derivation.
Re:Matrix Multiplication by beshrkayali on Tuesday January 18, 2022 @03:19AM (#29976475)
Really nice set of educational utils!
Re:Matrix Multiplication by throway453sde on Tuesday January 18, 2022 @03:51AM (#29976686)
In place of slider having a button with the label of current step would be nice.
Re:Matrix Multiplication by warmfuzzykitten on Tuesday January 18, 2022 @03:23PM (#29985179)
Nice one! (Just as it is.)