Saturday, April 16, 2011

Dot Products: What the hell do they mean?

First off, I think all the formulas and equations in linear algebra can be broken into two camps: stuff that is computable, and stuff that gives you some understanding of what's going on.

I submit to the jury, exhibit A:
a1*b1 + a2*b2 + a3*b3 .....
or
sqrt(a1^2 + a2^2 ...)*sqrt(b1^2 + b2^2)*cos(theta)
Computationally, this is really easy to do. You can crank this out on a test in the 1 minute, then slam the test down at the front of the desk in a giant display of "Fuck ya."
But what about understanding? The dot product doesn't really relate to any intuitive meaning. For example, when I see the equation for projections that involve dot products, it doesn't make much sense to me (see the far right of the below derivation).


So the projection of a onto b   =   a fraction of b that is proportional to the projection over b   =   some fancy math...... => a term that includes some dot products. 

The dot product equation only makes sense once you step back to that first (||y||/||b||)*b and realize that you can calculate ||y|| with some trig, and then wrap that trig in the definition of a dot product. 

My big message is that dot products sometimes hide the REAL meaning of the operation. Its a tradeoff between ease of computation and true understanding, and any good Linear Algebra course should take care to draw a distinction between equations that actually give you intuition vs equations that are easy to put into a machine. 

No comments:

Post a Comment