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

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

• Gravity does not decrease as you dig into Earth (initially) because it is not uniform as the question implicitly assumes. Mar 7 '15 at 2:46
• Possibly because when you go towards the center, the mass above you exerts its own gravity, which tends to cancel out the gravitational force towards the center. When you dig deeper, the mass above you increases and so does the upper component of gravity. If you assume the Earth composed of infinite spherical shells, you can proove the linear relationship between gravity and distance r<R, (R being the radius of the earth). Above the surface, it follows the inverse square law, because the same number of gravitational lines of force has to pass through decreasing surface area (as you go down). Mar 7 '15 at 4:04
• Possible duplicates: physics.stackexchange.com/q/18446/2451 , physics.stackexchange.com/q/2481/2451 , physics.stackexchange.com/q/119067/2451 and links therein. Mar 7 '15 at 8:47

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: 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).

Because as you go down, the mass above you has a gravitational pull on you that resists the pull of the mass below you. This continues until you reach the center and the pulls all cancel out, making you weightless.

When you go up, the force of gravity on you decrease because of the equation $$F = G\frac{m_1m_2}{r^2}.$$ As the distance increases, its square does even more so, making the force of gravity weaker as you leave Earth i.e. go up.

Just as there is a Gauss's Law for the Electric Field, there is similarly a law for the Gravitational Field. It states the following: $$-4\pi GM_{enclosed} = \oint \! g \cdot(dA)$$

When you go deeper into the earth, since the mass enclosed by a sphere of a certain radius is directly proportional to the volume enclosed (assuming constant density), the enclosed mass decreases faster than the surface area of the enclosed region decreases, causing a smaller gravitational field.

When you go into the atmosphere and further, since you've already exceeded the radius of the earth, the enclosed mass stays the same while the surface area of the gaussian sphere increases, causing a smaller gravitational field.