Actually, the (somewhat surprising) result is that it doesn't. In an earlier post, you were imagining the object divided into left and right hemispheres, and suggesting that since some of the gravitational force from each hemisphere would not be directed radially (and would cancel with some of the force from the other hemisphere), that the total force might be a little bit less. One could imagine an extreme case of this, measuring the gravitational force from a rigid rod, perpendicular to our line of sight. And indeed, if we were talking about a rigid rod, the gravitational force is not the same as a point object of the same mass as the rod. There's a deviation from the simple inverse square law that becomes more pronounced as you get closer.
Originally Posted by xylophobe
But notice that a rigid rod is not a spherically symmetric object. In the case of a sphere, there's not just some of the matter over on the left and some on the right. There's also some matter closer to you, which will exert a stronger pull, and some further away, which will exert a weaker pull. Since the force goes like the inverse square of the distance, there's not just a simple linear relationship. Intuitively, it seems likely that you'd have to know the exact distribution of matter to know the force it exerts, and that there could be a big difference. However, if you work out the math, you discover that as long as the distribution is spherically symmetric, it doesn't matter whether it's a tiny object with all of the mass concentrated at the center, or a big diffuse cloud with the mass all spread out, or even a hollow sphere, with all the mass concentrated on the surface, the resultant gravitational force is the same. It really is a pretty surprising result, but it's also really true, and pops out at you if you work out the math. You can see the derivation here.
Conserve energy. Commute with the Hamiltonian.