Live data from Hacker News

Matrix Multiplication

matrixmultiplication.xyz

91–100 of 135 posts

Re: Matrix Multiplication

#91

This is a cool example of what Bret Victor calls an "Explorable Explanation" [0]. That said, I feel that it's more important to understand how and why matrix multiplication corresponds to a composition of linear transformations than learning the actual mechanics of doing the computation. You can get good at matrix multiplication without knowing what is going on. I view that as a less valuable activity than learning a…

Is there something like this regarding homogeneous coordinates and the projective plane?

It's strange. Somehow I have now problems whatsoever regarding the use of 4-component vectors. As long as the z component stays one, I'm all set. But lately I'm trying to understand the construction of projection matrices and how to apply the knowledge of homogeneous coordinates, for example shadow mapping.

Parallel lines suddenly intersect? 3D space is just a projective plane? Now everything is all weird...

Re: Matrix Multiplication

#92
post #86

Matrices are linear maps, and matrix multiplication composes the linear maps. Now statements like the determinant of the product is the product of the determinants, the trace is preserved under similarity transforms (since similarity transforms just rewrite the linear map in a different basis), etc. are intuitive. I've always felt that these explicit calculations don't really get to the point. You can memorize them a…

When I was a math student, we had two semesters of linear algebra. We only saw matrices at the end of the first semester; other than that it was all about linear mappings.

The thing is, most linear algebra classes that are taught to other sections (biology, CS, …) start directly with matrices and are mostly computational.

Re: Matrix Multiplication

#93

The idea is good but I am afraid it misses the point entirely. Multiplying both columns of the right hand side matrix to the left hand side matrix is really not helping the target audience understand what is going on. 2 operations are going on as the same time. I believe https://www.youtube.com/watch?v=XkY2DOUCWMU is a much better way to illustrate the matrix multiplication (and provide a clear explanation of the why…

As part of the target audience (I didn't previously understand matrix multiplication, but now I do), you are definitely wrong. This does help the target audience understand what is going on.

I think your core fallacy is that all people need to be taught in the same way, and that there is one correct way to teach people. The videos you link to may work for some people, but not for others. This explanation may work for some people, but not others. It turns out not everything works for all people.

Re: Matrix Multiplication

#94
post #48

The idea is good but I am afraid it misses the point entirely. Multiplying both columns of the right hand side matrix to the left hand side matrix is really not helping the target audience understand what is going on. 2 operations are going on as the same time. I believe https://www.youtube.com/watch?v=XkY2DOUCWMU is a much better way to illustrate the matrix multiplication (and provide a clear explanation of the why…

Comments like these (aside from providing a nice link) just make authors of content sad. Why say such thing? You can say "here is another helpful link", but "misses the point entirely"? The point is to provide a self-evident mnemonic, as explained here: https://github.com/staltz/matrixmultiplication.xyz Not nice.

> Not nice.

100% agree. It reminds me of the "yes, and" rather than "yes, but" thing from improv and stuff like that.

If what you've done helps a single person (and it did me), then it is valid. It might not be perfect, and it might not be right for everyone, but it was useful and worth putting the effort into (and this was. Thank you for it).

Re: Matrix Multiplication

#95
post #35

Earlier quoted context omitted.

For understanding the mechanics of matrix multiplication, I found it useful to think in an analogy consisting of a grid of two layers of pipes; One -- the input-pipes -- coming in one direction, and the other -- the output pipes -- laid in an orthogonal direction. Then there would be "taps" in the cross-sections between the input and output pipes, representing the numbers (multiplication factors, really) in the matri…

I really like that. And matrix * matrix would just have to be 3D, with a whole cube of taps. Sure, not easy to illustrate, but the concept extends well. It also makes it more obvious what the complexity of the operation is.

Actually the complexity of matrix multiplication is not known. Current best is n^2.37

Re: Matrix Multiplication

#96
post #44

This is a cool example of what Bret Victor calls an "Explorable Explanation" [0]. That said, I feel that it's more important to understand how and why matrix multiplication corresponds to a composition of linear transformations than learning the actual mechanics of doing the computation. You can get good at matrix multiplication without knowing what is going on. I view that as a less valuable activity than learning a…

3Blue1Brown is an amazing youtube channel that provides very entertaining and educating visual explanation for all sorts of maths. He has a whole series on linear algebra, including matrix mulitplication: https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x...

I discovered this last night! I've been dealing with matrices frequently for the past 15 years and never really got them. Having watched his series now, I feel like I completely understand them, in a way that I never even fathomed before. I think I'm going to make a small series producing a raytracer from first principles, in a somewhat similar style; that visual design was just the perfect medium.

Re: Matrix Multiplication

#97
post #44

This is a cool example of what Bret Victor calls an "Explorable Explanation" [0]. That said, I feel that it's more important to understand how and why matrix multiplication corresponds to a composition of linear transformations than learning the actual mechanics of doing the computation. You can get good at matrix multiplication without knowing what is going on. I view that as a less valuable activity than learning a…

3Blue1Brown is an amazing youtube channel that provides very entertaining and educating visual explanation for all sorts of maths. He has a whole series on linear algebra, including matrix mulitplication: https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x...

Thanks, I had not seen that channel before.

Re: Matrix Multiplication

#100
Neat visualization. I feel it's important and eye-opening to note that there's not just one way to multiply matrices, there're five (according to Strang):

5 ways to multiply A B = C

1) Each element of C is a dot-product of corresponding rows of A with columns of B

2) Each column of C is a combination of the columns A. Each column of B has the coefficients.

3) Each row of C is a combination of the rows of B. Each row of A has the coefficients.

4) Accumulate outer-product. Accumulate sums of of outer-products of each col of A with each row of B.

5) Block multiplication

They all produce the same answer, but different ones provide different insight for particular situations.

See Video Lecture #3 of Strang's Linear Algebra course for more info: https://ocw.mit.edu/courses/mathematics/18-06-linear-algebra...

Post reply on HN