← All interactives
Eulerly · Lesson 3.4 · Try it yourself

Projection explorer

Drag the tips of b and a. The sun shines straight down onto the line of a: the purple shadow is the projection of b onto a, and the green remainder always stands at a right angle to a.

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