You're blindfolded in a city. A friend calls and says: "I'm at the Eiffel Tower. You're exactly 3 km from me."
You still don't know where you are. You could be anywhere on a circle of radius 3 km centered on the tower.
Then a second friend calls from Notre Dame: "You're exactly 4 km from me." Now you're at one of two points, the two places where those circles cross.
Then a third call, from the Louvre. One distance. Two circles already ruled out most options. This third circle passes through exactly one of those two intersection points.
That's GPS. Three satellites. Three distances. One location.
One satellite: you're on a circle
When a GPS satellite sends you a signal, your phone measures how long that signal took to arrive. Multiply by the speed of light and you have a distance, , from that satellite to you.
But that single distance doesn't pin you down. You could be anywhere at exactly that distance from the satellite — which traces out a perfect circle (or sphere in 3D, but we'll get to that).
One distance measurement from a single satellite places you anywhere on this circle — drag the slider to see the ring of possibilities.
Every point on that circle is an equally valid answer. You'd need more information to narrow it down.
Two satellites: you're at one of two points
Add a second satellite. Now you have a second circle. The two circles overlap at exactly two points (assuming they intersect at all).
Two points sounds much better than infinitely many, but it's still ambiguous. One of those two intersection points is usually underground or wildly implausible, so in practice you can often guess which one is right. But "probably" isn't good enough for navigation.
We need a third.
Three satellites: exactly one point
A third satellite gives a third circle. And here's the key geometric fact: three circles in general position intersect at exactly one point.
Drag the receiver anywhere — all three distance circles always intersect at exactly one point.
Drag the receiver anywhere on the map. All three circles always pass through exactly that one point — because we defined each radius as the distance from that satellite to you. This is what GPS does in reverse: it measures three distances and finds the one point where all three circles meet.
This technique is called trilateration. It's different from triangulation, which uses angles. GPS uses distances.
The math: solving the intersection
Here's where coordinate algebra comes in. Let the three satellites be at positions , , , with measured distances , , .
Each satellite gives us one circle equation:
Each of these is non-linear — they have and terms, which makes them hard to solve directly. But here's a trick: subtract the first equation from the second.
The and terms cancel, leaving something linear in and :
Do the same with the first and third equations. Now you have two linear equations in two unknowns. That's just a 2×2 system, solvable in a few algebraic steps.
We write it in matrix form and use Cramer's rule:
where and similarly for .
Solving gives you — your exact position.
The non-linear problem became linear the moment we subtracted equations. That's the core algebraic insight the whole system rests on.
The clock problem
GPS seems simple so far. But there's a catch that almost breaks the whole idea.
Your phone measures the travel time of the satellite signal. To do that, it needs to know exactly when the signal was sent. The satellite has an atomic clock, accurate to about 20 nanoseconds. That's fine.
But your phone has a cheap quartz clock. Quartz clocks drift by microseconds per second, sometimes more. And because the signal travels at the speed of light, m/s, even a tiny timing error causes a huge range error.
At microsecond of error: meters. At microseconds: kilometers.
Light travels 300 m per microsecond. A tiny clock error shifts Satellite A's circle — and the GPS fix drifts with it.
Slide the clock error up. Watch Satellite A's circle shift outward. The other two circles don't move — their measurements are still correct. But the three-circle intersection drifts away from the true position.
This is why GPS needs atomic clocks. But it also means your phone needs a way to correct its own clock error — and it does.
The fourth satellite solves the clock
Here's the elegant fix: add a fourth satellite. Now you have four distance measurements and four unknowns: , , (your 3D position), and (your receiver's clock error).
Four equations. Four unknowns. Solvable.
The receiver solves all four simultaneously, effectively calibrating its own clock against the satellite network on every fix. The atomic clocks stay on the satellites. Your phone gets atomic-clock-level accuracy for free, every time it calculates a position.
That's why civilian GPS is accurate to 3-10 meters, not 300 meters. The fourth satellite isn't just for redundancy — it's doing the clock correction.
From circles to spheres
Everything we've done so far was in 2D. In reality, satellites orbit at about 20,200 km altitude, and the Earth is a sphere. Each distance measurement gives you a sphere, not a circle.
Two spheres intersect in a circle. Three spheres intersect in two points. Four spheres intersect in exactly one point — which is why, in 3D, you need four satellites for a complete fix.
GPS satellites orbit continuously. Watch how many are visible above the horizon at any moment — a 3D fix requires at least 4.
Hit play and watch the satellites orbit. The ones above the horizon send signals down to the receiver. Below about four visible simultaneously, the fix degrades. That's why GPS struggles in cities with tall buildings blocking the sky, or in deep valleys — not because of any electronic failure, but because of geometry.
The short version
GPS solves a system of simultaneous distance equations. Each satellite contributes one equation: a circle (or sphere) of possible positions. Three circles meet at one point in 2D. Four spheres do the same in 3D. The math reduces to a linear system once you subtract equations pairwise to cancel the quadratic terms. The fourth satellite isn't just for redundancy — it solves for the receiver's clock error simultaneously with position.
The technology in your pocket is computing the intersection of four spheres, 5 to 20 times per second, accurate to within a few meters. And all of it rests on the same coordinate algebra you learned to solve in school.
All visualizations are interactive React components running entirely in your browser. The trilateration solver uses exact algebraic intersection. The orbit animation uses requestAnimationFrame with angular velocity integration. No libraries beyond React.