Vector Fundamentals

1.Vectors

Add, subtract, and scale 2D vectors. Read off a vector's length.

§RRead

A vector is a displacement, not a place.

A vector tells you how far and in what direction to move. It has no home — you can pick it up and place it anywhere. In two dimensions, a vector is two numbers: the horizontal step and the vertical step. We write it as (x, y).

The magnitude (length) of a vector (x, y) is sqrt(x^2 + y^2) — Pythagoras, working for you. Adding two vectors means chaining the displacements: the result is the diagonal of the parallelogram they form.

§TTry

Drag the arrows.

Below are two vectors, u and v, starting from the origin. Drag their tips. Watch their sum u+v appear as the parallelogram diagonal. Watch the magnitude readout change.

fig. 1-1
u = (2.0, 1.0)|u| = 2.24v = (-1.0, 2.0)|v| = 2.24u+v = (1.0, 3.0)
fig. 1-1 — vector-canvas-2d — draggable vectors u and v with live sum and magnitude
§PPredict

Predict.

If u = (3, 4), what is |u|?

§VVerify

Verify.

Drag u so it points at (3, 4). The magnitude readout should show 5.00. The widget below starts with u at (3, 4) so you can confirm immediately.

fig. 1-2
u = (3.0, 4.0)|u| = 5.00v = (-1.0, 1.0)|v| = 1.41u+v = (2.0, 5.0)
fig. 1-2 — vector-canvas-2d — u preset to (3, 4) for verification
§MModify

Explore.

Challenge 1: Find two vectors that sum to (0, 0).

Challenge 2: Can you find two non-parallel vectors of equal length whose sum has length zero? Try it. You will discover this is only possible when the two vectors point in exactly opposite directions — which makes them parallel.

fig. 1-3
u = (2.0, 1.0)|u| = 2.24v = (-1.0, 2.0)|v| = 2.24u+v = (1.0, 3.0)
fig. 1-3 — vector-canvas-2d — free exploration
Checkpoint

Drag the arrows so their sum u+v lands on the yellow target dot. Do it three times.(0 / 3)

fig. 1-4
u = (2.0, 1.0)v = (-1.0, 2.0)u+v = (1.0, 3.0)
fig. 1-4 — checkpoint — hit the target with u+v