Live data from Hacker News

Matrix Multiplication

matrixmultiplication.xyz

51–60 of 135 posts

Re: Matrix Multiplication

#51
post #42

Earlier quoted context omitted.

"All the mathematics you missed but need to know for graduate school"[1] helped me a lot (and, in fact, I had and did). Once I had finished that, Cullen's "Matrices and linear transformations"[2] was really helpful too. But I wouldn't do Cullen if you're still, as I was, floundering with the concepts of why you're doing this in the first place. It's great once you have those concepts down. [1]: https://www.amazon.com…

Garrity's book looks exactly what I've been looking for for brushing up on basic math skills after a decade of fairly low-brow work after my MSc. Thanks for the reference!

Hope it helps! It definitely got me through the first year of grad school...

Re: Matrix Multiplication

#52
post #23

Earlier quoted context omitted.

Bingo. We did matrices in high school and even through a first linear algebra course in undergrad I got more or less competent at the mechanics of matrix multiplication without ever having any sense of why anyone would want to do this or why these rules, as opposed to some other set of rules that were equally formally valid, were of any interest. I could even tell you what the eigenvectors of a matrix were but had no…

I feel very similar. Do you have any recommendations for resources to learn about why matrix multiplication is defined that way?

If you compose two linear transformations into one step, and apply distributive property, you get the matrix multiplication rule.

http://math.stackexchange.com/questions/31725/intuition-behi...

Re: Matrix Multiplication

#53
post #23

Earlier quoted context omitted.

Bingo. We did matrices in high school and even through a first linear algebra course in undergrad I got more or less competent at the mechanics of matrix multiplication without ever having any sense of why anyone would want to do this or why these rules, as opposed to some other set of rules that were equally formally valid, were of any interest. I could even tell you what the eigenvectors of a matrix were but had no…

I feel very similar. Do you have any recommendations for resources to learn about why matrix multiplication is defined that way?

Axler's book, "Linear Algebra Done Right", is widely considered to be one of the best texts on linear algebra that focuses less on the mechanics and more on the structure of linear operators on vector spaces.

http://linear.axler.net/

Re: Matrix Multiplication

#55
I think this is overdone and does not help the intuition. two things: (1). the first step of transposing the second matrix 90 degree is unnecessary and confusing. A row vector and a column vector are different. This step confuses the two. (2). All the final elements are independent and should be calculated in parallel, the stepped anime is not necessary and does not reveal this basic fact.

Re: Matrix Multiplication

#56
Question for staltz - are you happy with the cycle code at https://github.com/staltz/matrixmultiplication.xyz/ ? It feels like a lot of work for this sort of task which I feel could have been achieved by using an existing (mutable) matrix lib and drawing ad-hoc. It feels like an awful lot of code written - especially with all the `.something === "SOME_STRING_CONSTANT"` (couldn't those be typed directly in TS btw?).

Still, you're a smart guy - I'm trying to see why it's worth it. Do you really feel model-view-intent shines here?

(Nice visualization by the way)

Re: Matrix Multiplication

#57
Awesome.

Some concepts in math are so much easier to grasp with an interactive visual. I once made an entire game around matrix multiplication -- such that players didn't even know they learned how to do this.

And sometimes, visualizations can help cause discoveries. A lot of progress in theoretical physics came about because physicists 'guessed' what nature's equations should look like...and then got shocked when they discovered they were right.

Take James Clerk Maxwell, for instance:

"He had achieved his greatest success by relying on just one empirical fact known to every school boy. Yet now he tried to do without any empirical facts, by pure thinking. He believed in the power of reason to guess the laws according to which God has built the world."

http://www.mathpages.com/home/kmath103/kmath103.htm

Re: Matrix Multiplication

#58
post #40

As a gamedev who uses matrices all the time, I don't find this animation useful at all for practical work. Instead I think of matrix multiplication as creating a list of ordered operations (scale x translate x rotate etc) which is just encoded efficiently in a table, to then be sent to other parts of the program for use. You can even remove items from the list by multiplying by their inverse.

But of course when you have encoded the scale, rotate and translate into the matrix, it isn't possible to decode it back out to your original values. This is obvious if you consider the fact the following produce identical matrices (just consider 2D for now): 1. Scale in X and Y of -1 2. Z rotation of 180

Yes, I know, what is your point exactly? When I say 'list of ordered operations' I mean that if I were to apply the matrix to any object, you can imagine each transform in the list being applied one after another to the object visually, resulting in the final position.

Re: Matrix Multiplication

#59

I think a cool way to visualize matrix multiplication would be to put three matrices MxN, NxK, MxK on the sides of a three-dimensional box MxNxK. Each cell of the matrix MxK would cast a "shadow" onto some row in the MxN matrix and some column in the NxK matrix, whose dot product would give the value of that cell.

That's exactly how I finally fixed it in my head permanently.
Post reply on HN