Your phone knows where you are. Right now, within a few meters, it can place you on a map with a confidence that would have seemed like magic to anyone alive a century ago. But there is no magic here — only geometry. Specifically, a beautiful and ancient idea called trilateration, dressed up in satellites and atomic clocks.
Let’s build it from scratch.

Start With a Simple Question: Where Are You?
Imagine you’re lost in a featureless desert with no landmarks. A stranger walks up and says, “You are exactly 10 kilometers from the town of Arlo.”
Does that tell you where you are? Not quite. You could be anywhere on a circle of radius 10 km centered on Arlo. That’s a lot of desert.
Now a second stranger arrives: “You are exactly 8 kilometers from the town of Bex.”
Better. Now you’re somewhere on the intersection of two circles. Two circles can intersect at most at two points. You’ve narrowed it down to two possible locations.
A third stranger: “You are exactly 6 kilometers from the town of Corro.”
Now you’re at the intersection of three circles — and when the measurements are consistent, three circles meet at exactly one point. You’ve been found.
That’s trilateration in its purest form. No angles, no compass bearings — just distances. GPS works exactly this way, except instead of circles on a flat desert floor, we’re dealing with spheres in three-dimensional space, and instead of strangers, we have satellites orbiting 20,200 kilometers above Earth.
From Circles to Spheres
On a flat plane, knowing your distance from one point confines you to a circle. In three-dimensional space, knowing your distance from one point confines you to a sphere — the set of all points at that distance from the center.
- One satellite gives you a sphere. You’re somewhere on its surface.
- A second satellite gives you another sphere. The intersection of two spheres is a circle.
- A third satellite narrows you to the intersection of three spheres, which is typically two points.
- A fourth satellite resolves the ambiguity, leaving you with one point.
That’s why GPS receivers need signals from at least four satellites simultaneously (the fourth also solves a critical timing problem we’ll get to shortly).
The Distance Formula: How Far Is That Satellite?
Here’s where the math gets concrete. The GPS satellite doesn’t beam down your distance directly — it sends a radio signal containing a precise timestamp. Your receiver compares that timestamp to its own clock and computes:
Distance = Speed of light × Travel time
Radio signals travel at the speed of light: roughly 299,792,458 meters per second (about 3 × 10⁸ m/s). A signal from a GPS satellite 20,200 km away takes about:
t = frac20,200,000 m299,792,458 m/s ≈ 0.0674 seconds
That’s about 67 milliseconds — less than the blink of an eye. But here’s the catch: to measure that travel time accurately enough to be useful, your clock and the satellite’s clock must agree to within nanoseconds (billionths of a second). An error of just one microsecond (one millionth of a second) translates to a position error of 300 meters. That’s why GPS satellites carry atomic clocks accurate to about 1 nanosecond per day. Your phone does not — which is exactly why you need that fourth satellite.
The Clock Problem (And Its Elegant Fix)
Your phone’s clock is cheap and imprecise. Let’s say it’s off by some unknown amount b (for “bias”). Every distance your receiver calculates is therefore slightly wrong — not by a fixed number of meters, but by b × c meters, where c is the speed of light.
If your clock is off by just 1 microsecond, every distance is off by 300 meters. That’s a serious problem.
Here’s the elegant fix: treat the clock bias b as a fourth unknown, and solve for it simultaneously with your three position coordinates (x, y, z). You now have four unknowns:
- Your x-coordinate
- Your y-coordinate
- Your z-coordinate
- Your clock bias b
And you have (at least) four satellites, each giving you one equation. Four equations, four unknowns — the system is solvable. The GPS receiver doesn’t just find your position; it corrects its own clock in the process. Every location fix is also a clock calibration. That’s not a workaround — it’s a genuinely beautiful piece of mathematical engineering.
The Equations Under the Hood
Let’s write it out. Say satellite i is at position (Xi, Yi, Zi), and your true position is $(x, y, z)$. The true distance from you to satellite i is:
di = √(x – Xi)2 + (y – Yi)2 + (z – Zi)2
But your receiver measures a pseudorange — a distance corrupted by the clock bias:
ρi = di + b · c
So the equation for each satellite is:
ρi = √(x – Xi)2 + (y – Yi)2 + (z – Zi)2 + b · c
With four satellites, you get four of these equations. They’re nonlinear (because of the square roots), so your receiver solves them iteratively using a method called least squares, starting from a rough initial guess and refining it until the answer converges. This happens continuously, with position fixes typically updating several times per second.
A Worked Example (Simplified to 2D)
Let’s make this tangible with flat-earth numbers. Suppose three “satellites” are at known positions on a plane, and each sends you a measured distance:
| Satellite | Position | Measured Distance |
|---|---|---|
| A | (0, 0) | 5 km |
| B | (6, 0) | 5 km |
| C | (3, 6) | 2 km |
The circle around A: x2 + y2 = 25
The circle around B: (x-6)2 + y2 = 25
Subtract the first from the second:
(x-6)2 – x2 = 0
x2 – 12x + 36 – x2 = 0
-12x + 36 = 0 implies x = 3
Plug back into the first circle: 9 + y2 = 25 implies y2 = 16 implies y = 4 (taking the positive root, since our geometry places us above the x-axis).
Check with satellite C: √(3-3)2 + (4-6)2 = √0 + 4 = 2 km. This matches our measured distance of 2 km — all three circles intersect at the same point.
Your position: (3, 4). Found.
Why This Matters Beyond Navigation
The same mathematics — measuring distances and intersecting geometric shapes — shows up in more places than you might expect:
- Earthquake location: Seismographs at different stations record the arrival time of seismic waves. The difference in arrival times gives distances, and trilateration pinpoints the epicenter.
- Whale tracking: Underwater hydrophone arrays locate whale calls using the same technique (adapted for the speed of sound in water).
- Indoor positioning: Your phone’s Wi-Fi and Bluetooth chips use signal strength to estimate distances from routers and beacons, then trilaterate your position inside a building where GPS can’t reach.
- Astronomy: Measuring the time for radar pulses to bounce off planets gives distances, and those distances map the solar system.
In each case, the core insight is the same: distance information constrains position, and enough constraints uniquely determine it.
The One Insight to Take With You
Here it is, the mental model worth keeping:
Knowing your distance from a point doesn’t tell you where you are — it tells you the shape of where you could be. Stack enough of those shapes, and the only place they all agree is exactly where you are.
This is trilateration. It’s why your maps app works. It’s why seismologists can point to a fault line. It’s why we can track a whale singing in the deep ocean. And it’s built entirely on the intersection of spheres — a geometric idea so old that Euclid would recognize it, now running billions of times a day on satellites hurtling through space at 14,000 kilometers per hour.
Next time your phone drops a pin on a map, you’ll know what’s happening: a constellation of atomic clocks is solving a system of equations, in real time, to find you. Not magic. Just geometry.


Leave a Reply