Sub topic 3
The inverse-square law of gravitation
This chapter assumes you know Newton's three laws, basic vector notation, and uniform circular motion. Some calculus helps later in the tutorial but is not needed here. The Python examples use only the standard library.
The statement of the law
Newton's law of universal gravitation says that every pair of point masses attracts each other along the line joining them. The size of the force is
F = G · m₁ · m₂ / r²
- m₁ and m₂ are the two masses in kilograms.
- r is the distance between their centers in meters.
- G is the gravitational constant, about 6.674 × 10⁻¹¹ m³ kg⁻¹ s⁻². The next chapter covers how it was measured.
The force grows with each mass and shrinks with the square of the distance. Doubling either mass doubles the force. Doubling the distance cuts the force to a quarter.
The law is "universal" because the same formula applies to an apple falling from a tree, the Moon circling Earth, and two galaxies. Newton's claim was that the force that pulls objects down is the same one that holds the Moon in its orbit.
What inverse-square means
"Inverse-square" means the force is proportional to 1/r². The table shows how the force changes when the distance is multiplied by a factor.
| Distance factor | Force factor |
|---|---|
| 1/2 | 4 |
| 2 | 1/4 |
| 3 | 1/9 |
| 10 | 1/100 |
The force falls off quickly but never reaches zero. At any finite distance, gravity is still acting.
A common geometric explanation is that the influence of a point source spreads over the surface of a sphere. That surface area is 4πr², so the strength per unit area falls as 1/r². This picture is a motivation, not a proof. The 1/r² form was tested against observation, and the next section shows how.
A first calculation
Take the Earth and the Moon. Use these values:
- Earth's mass is 5.972 × 10²⁴ kg.
- The Moon's mass is 7.348 × 10²² kg.
- The mean distance between their centers is 3.844 × 10⁸ m.
G = 6.674e-11
def gravity_force(m1, m2, r):
"""Magnitude of the gravitational force in newtons."""
return G * m1 * m2 / r**2
M_EARTH = 5.972e24
M_MOON = 7.348e22
R_EARTH_MOON = 3.844e8
print(f"{gravity_force(M_EARTH, M_MOON, R_EARTH_MOON):.3e} N")The result is about 1.98 × 10²⁰ N. That is a very large force, but the Moon's mass is also very large, so the resulting acceleration is small.
Gravity is weak between everyday objects
Two 70 kg people standing 1 m apart attract each other with
F = (6.674 × 10⁻¹¹)(70)(70) / 1² ≈ 3.3 × 10⁻⁷ N.
That is roughly the weight of a few grains of sand, far too small to notice. Gravity only becomes obvious when at least one mass is planet-sized. This is why gravity is easy to overlook in daily life even though it dominates the motion of planets and stars.
The vector form and Newton's third law
The magnitude formula does not say which way the force points. For two point masses at positions r₁ and r₂, the force on body 1 is
F₁₂ = G · m₁ · m₂ · (r₂ − r₁) / |r₂ − r₁|³
The vector (r₂ − r₁) points from body 1 to body 2. Dividing by |r₂ − r₁|³ combines two steps. One factor of the distance turns the vector into a unit vector. The other two factors supply the 1/r². The force on body 1 therefore points toward body 2, so gravity is always attractive.
The force on body 2 is the same expression with the labels swapped, which gives F₂₁ = −F₁₂. This is Newton's third law. The forces are equal in size and opposite in direction, even when the masses differ greatly. The Earth pulls on you with the same force that you pull on the Earth. You accelerate much more because your mass is far smaller, and a = F/m.
import math
G = 6.674e-11
def force_on_first(m1, pos1, m2, pos2):
"""Gravitational force vector on body 1 due to body 2 (2D)."""
dx = pos2[0] - pos1[0]
dy = pos2[1] - pos1[1]
r = math.hypot(dx, dy)
scale = G * m1 * m2 / r**3
return (scale * dx, scale * dy)
f12 = force_on_first(5.0, (0.0, 0.0), 10.0, (3.0, 4.0))
f21 = force_on_first(10.0, (3.0, 4.0), 5.0, (0.0, 0.0))
print("force on body 1:", f12)
print("force on body 2:", f21)
print("magnitude:", math.hypot(*f12))Here the separation is 5 m, so the magnitude is G · 50 / 25 ≈ 1.33 × 10⁻¹⁰ N. The two printed vectors have the same size and opposite signs.
Superposition
When more than two bodies are present, the net force on one body is the vector sum of the forces from all the others. Each pair acts independently of the rest. This property is called superposition. It makes many-body problems straightforward to write down, though not to solve in closed form. The Sun, the planets, and the Moon all pull on each other at once, and a simulation adds up all those contributions at each time step.
The Moon test
Newton checked the 1/r² form against the Moon. At Earth's surface, free-fall acceleration is about 9.81 m/s². The Moon is about 60.3 Earth radii from Earth's center. If gravity falls as 1/r², the acceleration at the Moon should be
9.81 / 60.3² ≈ 2.7 × 10⁻³ m/s².
The Moon's observed motion gives a second value. It moves on a nearly circular path with period T ≈ 27.3 days, so its centripetal acceleration is 4π²r / T². The two numbers should agree if the law is correct.
import math
g_surface = 9.81 # m/s^2
R_EARTH = 6.371e6 # m
R_MOON_ORBIT = 3.844e8 # m
T_MOON = 27.32 * 86400 # s, sidereal month
ratio = R_MOON_ORBIT / R_EARTH
predicted = g_surface / ratio**2
observed = 4 * math.pi**2 * R_MOON_ORBIT / T_MOON**2
print(f"distance ratio: {ratio:.1f}")
print(f"predicted: {predicted:.2e} m/s^2")
print(f"observed: {observed:.2e} m/s^2")The two values agree to within about 1%. If the force fell as 1/r, the prediction would be about 60 times too large. That is the evidence that the exponent is 2.
Using the law at altitude
A frequent task is finding the pull at a height h above the surface. Use r = R + h, where R is the planet's radius. At 400 km above Earth, r = 6.771 × 10⁶ m. The force per kilogram is
G · M / r² ≈ (3.986 × 10¹⁴) / (6.771 × 10⁶)² ≈ 8.7 N/kg.
This is about 89% of the surface value, so a spacecraft at 400 km still feels most of its surface weight. Astronauts float because they are in free fall, not because gravity is absent there.
Common errors
Other errors to watch for:
- Forgetting to square r, or squaring only part of the expression.
- Mixing units. The constant G assumes kilograms and meters, so convert kilometers and grams first.
- Using the sum of both masses. The product m₁ · m₂ appears in the force, not the sum.
- Believing the heavier body feels the larger force. Both bodies feel the same magnitude.
- Treating the formula as valid for any shape. It holds exactly for point masses. For spheres with spherically symmetric density it also holds when r is the center-to-center distance, which a later chapter on the shell theorem justifies. For irregular shapes the point-mass formula is only an approximation.
- Using the formula for two bodies that overlap or touch with r equal to their surface gap. Distances must be center to center.
Summary of the working model
The law gives you three tools. First, it gives the magnitude of the force between two bodies from their masses and separation. Second, it gives the direction, along the line joining them, pointing from each body toward the other. Third, it gives the net force on a body as the vector sum of the pairwise forces. Later chapters combine these with F = ma to derive orbital speeds, periods, and energies.
Exercise
A satellite of mass 500 kg orbits at a distance r = 8.0 × 10⁶ m from Earth's center. (a) Compute the gravitational force on it using M = 5.972 × 10²⁴ kg and G = 6.674 × 10⁻¹¹ m³ kg⁻¹ s⁻². (b) What is the force if the satellite moves to r = 1.6 × 10⁷ m? (c) What force does the satellite exert on Earth at the first distance?
Show answer
(a) F = G M m / r² = (6.674e-11)(5.972e24)(500) / (8.0e6)² ≈ 1.993e17 / 6.4e13 ≈ 3.11 × 10³ N, so about 3.1 kN. (b) The distance doubles, so the force falls to one quarter, about 7.8 × 10² N. (c) By Newton's third law, the satellite pulls on Earth with an equal force of about 3.1 × 10³ N, directed toward the satellite.