1.Why should I care?
Every engineering drawing, CAD sketch and robot path is written in coordinates. Machinists drill holes from coordinate tables, and robots move their hands to coordinates. The moment two features are not lined up, the distance between them is a diagonal, and Pythagoras is how engineers get it right first time.
- ◇ Locate features on a part with (x, y) coordinates measured from a stated origin.
- ◇ Use Pythagoras' theorem to find the straight-line distance between two features.
- ◇ Find the angle of a line between two points from its across and up distances.
2.Predict
Hole A is at (0, 0) mm and hole B is at (30, 40) mm. How far apart are their centres?
Guess first. Being wrong here is how the surprise works.
3.Discover
Choose 'Measure a part'. Hole A is fixed at (10, 10) mm. Move hole B, work out the distance on paper with Pythagoras, then press check. Find two positions of B where the distance is a whole number of millimetres.
Loading the interactive…
Can't use the interactive? Read a description instead
The geometry explorer shows a 60 by 40 millimetre plate on a 10 millimetre grid. Hole A is fixed at (10, 10). You choose hole B's coordinates with two sliders. Dashed lines show the across distance Δx and the up distance Δy; a solid line joins the holes. After you press check, the distance √(Δx² + Δy²) and the angle of the line are given in words.
4.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
On the geometry explorer, hole A is at (10, 10) mm and hole B at (13, 14) mm. What is the distance between them, in millimetres?
5.Understand
Coordinates need an origin
A coordinate pair (x, y) means 'go x across, then y up' from a chosen origin, usually a corner or the centre of a part. Engineers always state the origin and the unit (mm on drawings), because (10, 10) means nothing without them. Moving the origin changes every coordinate, but never the distance between two features.
Diagonals are hypotenuses
Subtract coordinates to get the across and up distances, Δx and Δy. They form the two short sides of a right-angled triangle, and the straight-line distance is the hypotenuse: d = √(Δx² + Δy²). Check the answer is longer than both Δx and Δy but shorter than their sum. If not, something went wrong.
Angles from the same triangle
The same triangle tells you the direction of the line. The angle above the x-axis has tan θ = Δy ÷ Δx, so θ = tan⁻¹(Δy ÷ Δx). You will meet tan properly next week; for now, notice that a line rising 30 mm over 30 mm across is at 45°, whatever its length.
Explain it another way
Walking across a rectangular field corner to corner is shorter than going round two sides. Pythagoras tells you exactly how much shorter.
For points (x₁, y₁) and (x₂, y₂), the Euclidean distance is d = √((x₂ − x₁)² + (y₂ − y₁)²) and the direction is θ = atan2(y₂ − y₁, x₂ − x₁). In 3D add (z₂ − z₁)² under the root.
Holes at (10, 10) and (13, 14) mm: Δx = 3, Δy = 4, d = √(9 + 16) = 5 mm. A 60 × 40 mm plate's diagonal: √(3600 + 1600) = √5200 ≈ 72.1 mm.
Bolt circles on motor mounts, the spacing of wheels on a chassis and the travel of a 3D printer's nozzle are all specified as coordinates, then checked with distances like this.
Derivation: Why the distance is √(Δx² + Δy²)
Write the across distance as Δx = x₂ − x₁ and the up distance as Δy = y₂ − y₁. These are measured along the axes, so they meet at a right angle.
The straight line from A to B closes the triangle. It is the hypotenuse: the side opposite the right angle.
Pythagoras' theorem says the square on the hypotenuse equals the sum of the squares on the other two sides: d² = Δx² + Δy².
Take the square root: d = √(Δx² + Δy²). Squaring means a negative Δx or Δy gives the same distance, so it doesn't matter which point you call A.
Worked example 1
Four bolts sit at the corners of a 40 mm square. How far apart are two diagonally opposite bolts?
Δx = 40 mm, Δy = 40 mm. d = √(40² + 40²) = √3200 ≈ 56.6 mm. (For any square, the diagonal is the side × √2.)
Worked example 2
A robot's gripper is at (120, 80) mm and the part is at (60, 160) mm. How far must the gripper move in a straight line?
Δx = 60 − 120 = −60 mm, Δy = 160 − 80 = 80 mm. d = √(3600 + 6400) = √10000 = 100 mm. The minus sign only tells you it moves left; squaring removes it.
Common mix-ups
- The distance between two points is Δx + Δy.
✓ That is the distance along the grid lines. The straight-line distance is √(Δx² + Δy²), which is always shorter unless one of them is zero. - Negative coordinates give negative distances.
✓ Distances are never negative: squaring Δx and Δy removes the sign.
6.Practice on your own
Practice, not a test. Wrong answers get a hint and another try.
Practice 2 · a fresh version every time
A drawing puts hole A at (6, 33) mm and hole B at (14, 39) mm. How far apart are the hole centres, in millimetres?
Practice 3
How long is the diagonal of a 60 mm × 40 mm plate, in millimetres?
Practice 4
A designer moves a drawing's origin from the bottom-left corner to the centre of the plate. What happens to the distance between two holes?
Practice 5
A classmate says the distance between (0, 0) and (6, 8) mm is 14 mm. What is the quickest way to know they are wrong?
7.Apply it
Sketch a 60 × 40 mm mounting plate for a small motor with four holes. Give every hole a coordinate from one corner, then calculate the distance between each pair of diagonal holes. Check one with the geometry explorer.
8.Reflect
Concepts: Geometry for parts: distance, similarity, area and mass · Vectors