Scalar Projection of a Vector
What you'll learn: How to measure how much of one vector lies in the direction of another vector.
The Core Idea
Imagine you're walking diagonally across a field, but your friend only wants to know how far north you've traveled—not your actual diagonal path. The scalar projection tells you exactly this: given two vectors, it measures how much of one vector extends in the direction of the other.
Mathematically, the scalar projection of vector a onto vector b is written as comp_b****a (read as "component of a along b"), and it's calculated using:
comp_b(a) = (a · b) / ||b||
Where:
- a · b is the dot product of the two vectors
- ||b|| is the magnitude (length) of vector b
Alternatively, using the geometric interpretation of the dot product:
comp_b(a) = ||a|| cos(θ)
Where θ is the angle between the vectors.
Why It Matters
The scalar projection gives you a signed number (not a vector!):
- Positive when the vectors point in generally the same direction (θ < 90°)
- Zero when they're perpendicular (θ = 90°)
- Negative when they point in opposite directions (θ > 90°)
Think of it as the "shadow" that vector a casts onto vector b when light shines perpendicular to b.
Example in Plain English
If a = (3, 4) and b = (1, 0), the scalar projection of a onto b is 3, because a extends 3 units in the horizontal direction that b points.
Key Takeaway: The scalar projection measures the signed length of one vector's component in another vector's direction, computed as (a · b) / ||b||.