The gravitational acceleration decreases with height above the Earths surface with an inverse square relationship. At the Earth’s surface g = GM E/RE. At a distance of twice the Earth’s radius away from the Earth, the gravitational acceleration is GME/4, at 3 r E, g = GM E/9 and so on.
The plot shows this variation as a function of distance from the centre of the Earth
Figure 5. Variation of g with distance measured in terms of Earth radii. Green line shows a more accurate theoretical values.
Figure 6. Calculating g inside the Earth
What is the value of g inside the Earth? If we assume that the Earth has a constant density, we can work out the mass from the equation
mass= density x volume
Assuming also that the Earth is spherical, (it is actual an oblate spheroid, that is to say, wider at the equator than at the poles), then the volume of a sphere is given by 4/3 π r E3. Where r E is the radius of the Earth (6400 km).
If we were to dig down into the Earth a distance h. The new radius would be r E- h. The mass that produces a gravitation force is now (4/3) π (r E- h)3 ρ
Then the value of gravitional acceleration inside the Earth is
g = (4/3) G π (r E- h)3 ρ/(r E- h)2= (4/3) G ρ π (r E- h)
This has a linear or straight-line dependence on the radius. The density can be found by calculating the mass and volume of the Earth. ρ=ME/VE.
A more advanced theoretical prediction of the magnitude of gravity is shown by the green line. The real variation in gravity depends on the variation of density of the material with depth.