Hacker News new | past | comments | ask | show | jobs | submit login

Not at all.

Start with linear transformation F from vector space V to vector space W, each of which has a basis (v1, ..., vn) and (w1, ..., wn). The matrix M representing F in that pair of bases is (F(v1) F(v2) ... F(vn)) where each vector is written as a column.

Given those bases it is easy to demonstrate that every linear function can be uniquely represented that way.

Thanks to the properties of linearity, it is easy to demonstrate that the special case of matrix multiplication of a matrix against a column is the same as applying that linear function to the corresponding vector. Furthermore you can demonstrate that given the basis and the matrix, you have actually defined a linear function. (Therefore completing the demonstration that matrices are a notation for linear functions, and linear functions are what matrices represent.)

With that in mind the matrix representing (F o G) is going to be ((F o G)(v1) ... (F o G)(vn)). And when you unwind that definition you find that function composition turns into matrix multiplication. (As long as all of the bases match up of course, don't forget them!)

At this point you now have a rule for matrix multiplication. Thanks to the correspondence to linear functions, you can derive all of its algebraic properties (including associativity) from the corresponding properties of linear functions.

Incidentally by keeping track of the role of the basis throughout the presentation, you make it much easier to work out change of basis matrices later. Which has a lot of potential to be confusing because they work out to be the inverse of what you'd naively guess them to be. For instance if you rotate your basis 30 degrees clockwise, the change of basis matrix you get is a rotation 30 degrees counter-clockwise. (This happens for the same reason that while you spin clockwise, it looks to you like the world is spinning counter-clockwise.)

So how do you get the change of basis matrix? Well, go back to the definition. Make your function be the identity (everything remains the same, and then you just write out a matrix which has each column being, in the new basis, the coordinates of the basis vectors for the old basis.

Now an exercise to demonstrate to yourself that you really understood this. Let V be the vector space of polynomials of degree at most 2, and W be the vector space of polynomials of degree at most 1. Let F be the linear function called "differentiation". Start with a coordinate system on V which is just (p(0), p(1), p(2)) and a corresponding coordinate system on W which is just (p(0), p(1)). In that pair of coordinate systems, what matrix represents F?

If you can figure that out, you probably understood the whole thing. If not, well...

(Big hint. There is a different pair of coordinate systems in which you can easily write down the answer. Use that fact...)




Thanks for the detailed explanation. I was subconsciously thinking "Matrix multiplication is this weird operation, which happens to be isomorphic to function composition in the space of linear transformations." rather than "Function composition, when functions are represented as matrices, is called matrix multiplication."

It sounds so obvious now...


I need to stay silent until the end of the year to reflect how I missed that. Adios




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: