Arrow keys move:
Change a, watch the shadow
a = b =
a · b
‖a‖
Scalar projection a · b / ‖a‖
the signed length of the shadow, the component of b along a
a · a
Vector projection (a · b / a · a) a
the shadow as an arrow
Remainder r = b − proj
Check: r · a
zero means the remainder is at a right angle to a
Add them back: proj + r
Lesson examples
Pick an example, then drag.
What to try
- Drop b into every quadrant. Which side of the green and red dividing line gives a backward shadow?
- Drag b until the shadow shrinks to a dot. What is a · b there?
- Press a × ½ and a × 2. The scalar projection and the shadow do not move: a only supplies a direction.
- Press make a a unit vector. Now ‖a‖ = 1, so the scalar projection is just a · b.
- Press flip a. The shadow arrow stays put, but the scalar projection changes sign. Why?