Why four, not three?
Three distances pin down a point in space. But your phone's cheap clock is never exactly right, and light travels 300 km in one thousandth of a second. A fourth satellite gives one more equation, so the phone can solve for its own clock error too.
Einstein is inside your phone
The satellites' clocks tick slightly faster than ours because gravity is weaker up there, and slightly slower because they move fast. Together they gain about 38 millionths of a second a day. Left uncorrected, that would drift your position by about 10 km every day.
Why GPS struggles in cities
Tall buildings hide the satellites low in the sky and bounce the signals around. Fewer satellites and longer paths mean a worse fix, which is why the blue dot jumps about between skyscrapers.
Does the phone shout back?
No. Real GPS is one way: the satellites talk and your phone only listens. That is why GPS works without a signal bar, in airplane mode, and why satellites cannot see where you are. The “Phone shouts back” switch is only a picture. Messages from a remote mountain (SOS, Find My) use a different two-way link.
Why it works on a remote mountain
Satellites cover the whole planet, so you do not need a phone tower. You only need open sky. In a forest the leaves weaken the signal, and in a city tall buildings hide satellites low in the sky.
Not only GPS
GPS is the American system. Russia has GLONASS, Europe has Galileo, China has BeiDou, and India has NavIC. Modern phones listen to several at once, so more satellites are in view.
Remember thisGPS is a stopwatch race. Time the signals from four satellites and the clocks hand you your position.
What is real, and what is simplified. Real: the orbit height (20,200 km), the six orbital planes tilted 55°, the 12-hour orbit, the speed of light, the way ranges turn into circles, and a genuine least-squares solver that finds your position and your clock error from the signals. The accuracy and geometry numbers come from that solver. Simplified: the satellites are spaced evenly (the real ones are not), the signals are slowed down, the mountain, desert and forest are drawings, the “Phone shouts back” pulses are only a picture, the noise is a gentle wobble rather than a full model of the atmosphere, and relativity is explained but not simulated. The land outline is drawn from Natural Earth map data.