Visual walkthrough — Distance formula — derivation using Pythagoras
Before we begin, three words we will lean on the whole way:
Step 1 — Put the two points on the grid
WHAT: We draw the flat grid (the Cartesian plane) and drop two dots: and .
WHY: You cannot measure a distance until you can see where the two things are. The grid gives every dot an exact address — "across, then up" — so we can talk about them with numbers instead of vague pointing.
PICTURE: The horizontal line is the ==-axis==; numbers on it grow as you go rightwards, so "across" always means "to the right." The vertical line is the ==-axis==; numbers on it grow as you go upwards, so "up" always means "upward." Dot sits at address , dot at . The dashed grey string between them is exactly the length we want.

Right now is a slanted length. Slanted lengths are hard. The whole trick of the next steps is to turn that one hard slanted length into two easy straight-along-the-grid lengths.
Step 2 — Build the right triangle with a corner point
WHAT: From we walk purely sideways, and from we drop purely downward. They crash into each other at a brand-new corner dot we call .
WHY: Sideways and downward lines are easy to measure — you just count grid squares. By making the slanted string (the length from to ) the long side of a triangle whose other two sides run along the grid, we swap one hard measurement for two easy ones. That corner is the key: it makes a perfect right angle (a square 90° corner).
PICTURE: The new dot shares 's across-value and 's up-value, so its address is . Look at the little square symbol at — that marks the right angle. Now , , form a right triangle: slanted (what we want), flat, vertical.

Step 3 — Measure the flat (horizontal) leg
WHAT: We find — the length of the bottom side, from point to point .
WHY: Both and sit at the same height , so this side is perfectly flat. Its length is just how far across you moved — the difference of the two across-values.
PICTURE: Follow the coral arrow along the bottom. It starts at across-value and ends at . The gap it covers is .

Step 4 — Measure the upright (vertical) leg
WHAT: We find — the length of the right side, from point to point .
WHY: Both and sit at the same across-value , so this side is perfectly vertical. Its length is just how far up you moved — the difference of the two up-values.
PICTURE: Follow the mint arrow going up the right side. It runs from up-value to , covering a gap of .

Now the triangle is fully labelled: flat leg , upright leg , and the slanted long side still unknown. Time to connect them.
Step 5 — Fire Pythagoras Theorem at the triangle
WHAT: We use the rule that links the two legs of a right triangle to its long side (the hypotenuse, the side opposite the right angle).
WHY THIS TOOL, and not any other? Because this is the only triangle-fact that connects a slanted length to two grid-aligned lengths using nothing but arithmetic. It was built for exactly this situation: a right angle plus two known sides. We deliberately manufactured the right angle at in Step 2 precisely so we would be allowed to use it.
PICTURE: Pythagoras says: paint a square on each side. The big square on the slanted side has the same area as the two smaller squares on the legs added together. That is the whole theorem in one image.

Here the little raised is a power this time (not a subscript!): means , the area of the square drawn on the segment .
Step 6 — Substitute the leg lengths in
WHAT: We replace and with the actual expressions from Steps 3 and 4, and rename the long side as .
WHY: Pythagoras gave us a true statement about the sides; now we pour in what those sides actually equal so the equation speaks in coordinates.
PICTURE: Same painted-squares picture, but each square is now stamped with its coordinate size.

Step 7 — Undo the square to free
WHAT: We have ; we want . So we take the square root of both sides.
WHY the square root, and only the positive one? A square root answers the question "what number, times itself, gives this?" — it undoes squaring. We want the length itself, not its square, so we must undo. And a length can never be negative, so of the two possible roots ( and ) we keep only the positive.
PICTURE: The big square on the long side has a known area; taking its square root turns that area back into the side length — literally shrinking the painted square back down to the edge it was drawn on.

Step 8 — The degenerate cases (never left guessing)
WHAT: We check what the formula does when the triangle collapses. A "degenerate" case is when the picture stops being a proper triangle.
WHY: A formula you can trust must survive the weird inputs, not just the pretty ones.
PICTURE: Three collapsed configurations side by side — same points on a flat line, same points stacked vertically, and both points identical.

- Same height (). The upright leg has length , so the triangle flattens into a line. Then and — just the flat distance. ✔
- Same across-value (). The flat leg is ; the triangle stands up as a line. Then — just the vertical distance. ✔
- Same point (). Both differences are : . Zero distance — a point is zero away from itself, exactly right. ✔
The one-picture summary
Everything above, compressed into a single frame: two dots, the manufactured corner, the two labelled legs, the squares on all three sides, and the boxed answer.

Move-count check
The role of the right angle
Why squares before roots
Recall Feynman retelling — say it plain
Picture two dots on graph paper. I want the length of the straight string between them, but slanted strings are hard to measure. So I cheat: from the first dot I walk sideways, from the second I walk down, and they meet at a corner — and that corner is a perfect square 90°. Now I've boxed the string inside a right triangle whose other two sides run neatly along the grid, so I can just count their lengths: one is how far across (), the other how far up (). Old Pythagoras hands me the rule "square each short side, add them, that equals the square of the long side." So the long side squared is . I only wanted the long side, not its square, so I take the square root — and there it is, the distance. It never breaks: negatives get squared away, a flat line just zeroes one leg, and two identical dots give zero. That's the whole story, drawn instead of memorised.
Connections
- Pythagoras Theorem — the single tool that powers Steps 5–7
- Cartesian Coordinate System — where the dots get their addresses
- Midpoint Formula — same triangle idea, but halving instead of measuring
- Section Formula — divides the segment we just measured
- Equation of Circle — "all points at fixed distance," built directly on this formula
- Distance Formula in3D — add one more squared leg under the root