TwiddleLab / Math / Vectors and Matrices
How Long Is an Arrow?
What you will learn
- The length of (x, y) comes from the squares on its legs: length² = x² + y².
- So the length is √(x² + y²). For (3, 4) that is √25 = 5.
- Distance between two points is the length of the arrow between them. AI uses it to find nearest neighbours.
How the lesson goes
A drone flies 3 km east, then 4 km north.
How far is it from you, in a straight line? Drag the lever to your bet.
Fly the drone to the beacon at (3, 4).
Squares grow on the two legs of its arrow. A tilted one sits on the arrow itself.
Pour the small squares into the tilted one.
Do the 9 and the 16 cells fill it?
That is how long an arrow is.
The squares on the two legs add up to the square on the arrow: length² = x² + y².
So the length of (x, y) is √(x² + y²). For (3, 4): √(9 + 16) = √25 = 5.
This is the Pythagorean theorem, used on an arrow.
Game: find six different arrows of length 5.
Drag the head to a grid point and let go. Each find lights up.
How long is the arrow (5, 12)?
length² = 5² + 12² = 25 + 144 = 169, and √169 = 13.
An AI sorts a new animal by its nearest neighbour.
Each dot is an animal: ear length across, weight up. Tap the one closest to the ?.
Distance is the length of the arrow between two points. (8, 3) - (5, 5) = (3, -2), length √13 ≈ 3.61, shorter than the 4 to the dog above.
Make an arrow exactly 10 long that is not flat or straight up.
Drag the head. The card adds the squares for you.
Length 10 means x² + y² = 100. Doubling (3, 4) gives (6, 8): 36 + 64 = 100.
Length is √(x² + y²): the straight-line shortcut.
Race your arrow: one drone flies straight, the other along the legs.
Previous lesson: Arrows That Move Things · Next lesson: Adding Arrows · Part of the course: Vectors and Matrices
Lessons are interactive and need JavaScript. Turn it on to play them.