Projection of u on v is kinda like how much of u would lie on v.
Projections are like the x,y components of our original vector.
projv(u)=∣∣v∣∣2v⋅uv=(v⋅u)(∣∣v∣∣v)∣∣v∣∣1
From physics, we know that the horizontal component (the projection) is rcosθ.
Here we are just expressing it vectorially, without involving angles.
The dot product helps us replace the angle, but there are two problems with it.
First, dot product is scaler. It does not automatically tell us which direction the resulting projection points toward. We can use intuition in problems, but we also need a concrete math definition we can fall back on.
Second, while the dot product helps us replace the angle, it also brings along the second vector with it.
We solve the direction issue by calculating the unit vector of the projected-upon vector. Giving us the first fraction-bracket.
The second fraction helps us undo the dot product effect (partly). We are basically cancelling out the second vector.
Perp
Perp is the vertical component of the projection.
Since everything here is a vector:
perpv(u)=u−projv(u)
Both are perpendicular to each other.
Directions of Projections
Use the cosine, angle rules from dot product to figure it out.