A straight route and an across-then-up route reach the same point. Their lengths are different. The right triangle lets us measure the straight route.
Drag in the picture or use the labelled inputs and sliders. Grid squares span 25 world units. This is a mathematical model running in your browser.
Three sides, one relationship
Start at (120, 90). Going across and then up travels 120 + 90 = 210 units. The straight line is shorter. It forms the hypotenuse: the side opposite the right angle.
For a right triangle, Pythagoras gives r² = x² + y². Squaring means multiplying a number by itself. Here 120² + 90² = 14,400 + 8,100 = 22,500. Its positive square root is 150, so the straight distance is 150 units.
The experiment calculates that distance as you change the point. Change X to −120. The coordinate is negative, but the side length is 120. Squaring removes the sign: (−120) × (−120) = 14,400. Distance stays non-negative.
Double both coordinates to (240, 180). Does the distance double or quadruple?
Show the explanation
It doubles to 300. Each squared term quadruples, giving 90,000, but the square root brings the factor back to two. The triangle keeps its shape.
Separate direction from size
At (120, 90), the horizontal share of the sloping side is 120 / 150 = 0.8 and the vertical share is 90 / 150 = 0.6. At (240, 180), those ratios are still 0.8 and 0.6. They describe the same direction at a different distance.
Try (0, 0). Distance is zero and there is no direction to describe; dividing by zero cannot produce these shares. The experiment marks them as undefined.