How to solve
comp_v(u) = (u · v)/|v| measures how much of u points along v.
Steps
- Compute the dot product u · v.
- Compute |v| — these drills use Pythagorean lengths.
- Divide.
Example
u = (6, 8) onto v = (3, 4).
- u · v = 18 + 32 = 50.
- |v| = 5.
- 50 ÷ 5 = 10.
Answer: 10
Loading drills…