The value of acceleration due to gravity is calculated to be maximum at the surface of the Earth. The value goes on decreasing with
(i) increase in depth below the Earth’s surface.
[varies linearly with (R – d) = r]
(ii) increase in height above the Earth’s surface.
[varies inversely with (R + h)2 = r2].

Graph of g, as a function of r, the distance from the centre of the Earth, is plotted as shown in figure.
For r< R,
gd = g\((1-\frac{d}{R})\)
if r = R – d,
g(r) = g\((\frac{r}{R})\) ⇒ g(r) ∝ r
Hence, the graph shows a straight line passing through origin and having slope \(\frac{g}{R}.\)

which is represented in the graph.