Distance affects gravity by influencing the strength of the gravitational force between two objects according to the inverse-square law. Specifically, the force of gravity is inversely proportional to the square of the distance between the centers of the two masses. This means that as the distance between the objects increases, the gravitational force decreases rapidly. For example, if the distance between two objects doubles, the gravitational force becomes one-fourth as strong. This relationship can be expressed mathematically by Newton's law of universal gravitation: F=Gm1m2r2F=G\frac{m_1m_2}{r^2}F=Gr2m1m2 where FFF is the gravitational force, GGG is the gravitational constant, m1m_1m1 and m2m_2m2 are the masses of the objects, and rrr is the distance between their centers. The further apart the objects are, the weaker the pull of gravity between them becomes. This explains why astronauts experience microgravity when orbiting Earth at a distance, and why the gravitational force at high altitudes is slightly less than at the Earth's surface.