[Physics] Why does the value of gravity decrease as we dig into the Earth, but also decrease as we enter the upper atmosphere?

earthnewtonian-gravityplanets

I know the answer (hence, the title). But, why, i do not understand?

Best Answer

This is due Newtons shell theorem which says that for the particle $m$ all the mass outside the blue shell of radius $r_1$ cancels out:

image

while the mass inside a shell of radius=0 equals also 0 so there is no gravitational acceleration in the gravitational center of the earth (or any planet).