Truly awesome duality between dot products and projections
Last year, I watched 3Blue1Brown’s video of dot products, but I only had a vague idea about their connection to projections. However, dot products showed up again and again in my math courses, so I decided to rewatch it. To my relief, it makes much more sense after MATH223, and the connection is indeed “truly awesome” as 3B1B said in the video.
Now, I’m going to reconstruct the whole idea to deepen my understanding. I created images with the help of Mathcha, an online math editor.
Multiplying a 1×2 matrix [uxuy] with a 2D(2×1) vector [xy] gives us a 1×1 scalar value s=uxx+uyy.We interpret this as “transforming any 2D vector to a point on the 1D number line”. Although this numerical value is just from the familiar matrix-vector multiplication, its geometric meaning is exciting.
Questions
What does multiplying by [uxuy] mean geometrically?
How is this related to taking the dot product with the vector [uxuy]?
Let i,j be unit vectors in R2, and let u=[uxuy] be a unit vector on line L.
But ∣proj∗iu∣ is just the x-coordinate of u,ux. Now, if we want to know the orthogonal projection of any vector in R2 onto line L, we only need to find where i,j land.
Note: The projection outputs a scalar, the orange dot on the number line, not a 2D vector lying on the line. What we get is the component of a vector in the direction u.
Define the transformation T:R2→R as
T([xy])=[uxuy][xy]
which is the orthogonal projection onto line L.
First, is it linear? Let v,w∈R2,c∈R.T(0)T(cv+w)cT(v)+T(w)=[uxuy][00]=0=[uxuy][cvx+wxcvy+wy]=ux(cvx+wx)+uy(cvy+wy)=cvxux+cvyuy+uxwx+uywy=c[uxuy][vxvy]+[uxuy][wxwy]=c(uxvx+uyvy)+(uxwx+uywy)
It is easy to see that (1) = (2), so it is linear. For any vector [xy]∈R2,T([xy])=T(xi+yj)=xT(i)+yT(j)=xux+yuy
which is the same as taking the dot product [xy]⋅[uxuy].
What if u is not the unit vector? Then the unit vector will be u∣∣u∣∣1. So our matrix encoding the projection is now [∣∣u∣∣ux∣∣u∣∣uy].
T([xy])∣∣u∣∣T([xy])=∣∣u∣∣xux+∣∣u∣∣yuy=xux+yuy
The left hand is multiplying the projection of [xy] onto L by the length of u, and the right hand side is [xy]⋅[uxuy]
It is time to answer our questions:
Geometrically, multiplying by [uxuy] is the same as finding the component of any vector in direction u=[uxuy] and scaling by ∣u∣. The lengthy version: projecting one vector onto the other one and multiplying by the length of the one being projected onto.
Applying this transformation gives us the same result as taking the dot product with u.
This association is what he mentioned in the video as “duality”, a fascinating concept in math, so it’s definitely worth watching. Thanks again for the inspiration.