# Gravitational potential energy definition

"Gravitational potential energy of a system of masses is defined as the negative of the work done by gravitational force in bringing the masses from infinity to that configuration" ~ the definition in my book.

Is the "gravitational force" here refers to the gravitational forces of all the masses that do work on each other to kinda "set up" the configuration from infinity ?

This might be easiest to illustrate by example. Say your system consists of three point masses, located at positions $$\vec{r}_1$$, $$\vec{r}_2$$, and $$\vec{r}_3$$.

Now imagine we bring these three masses in from infinity, one at a time, to construct the system.

When moving the first mass from infinity to $$\vec{r}_1$$, the gravitational forces does no work on the mass, because there are no other masses to create a gravitational field.

When moving the second mass from infinity to $$\vec{r}_2$$, the gravitational force due to the first mass pulling on the second does work. Therefore, the final configuration of mass 1 at $$\vec{r}_1$$ and mass 2 at $$\vec{r}_2$$ has some energy, given by minus this work.

When moving the third mass from infinity to $$\vec{r}_3$$, the gravitational force of the first mass acting on the third and the second mass acting no the third both do work. Therefore, the final configuration of the three masses has gravitational energy, consisting of minus the work of the first acting on the second (from the previous paragraph), minus the work of the first mass acting on the third, minus the work of the second mass acting on the third.

This argument can be generalized to $$N$$ point masses.

Gravitational potential energy between two masses is the work required to bring these two masses from whatever you call the reference situation to the current situation. Gravitational force is dependent on distance between the two objects, and so is gravitational potential energy. Because $$\frac{1}{r}$$ goes to zero when $$r$$ approaches infinity, infinity is the best distance to use for the reference distance, the distance at which $$U=0$$.

Bringing in the first mass experiences zero force and thus zero change of potential energy. $$U$$ is still zero. The second mass experiences gravitational force from only the first mass, and only one gravitational potential energy becoming more negative as the mass approaches. You could also bring both in at the same time from a distance of infinity between them to a distance of $$r$$ between them. Change of potential energy depends only on initial and final states.

With more than two objects, you have a gravitational force between each pair of objects. Therefore, you have a gravitational potential energy between each pair of objects. Often the easiest way to be sure you don't forget a GPE between a pair, and don't count any value twice, is to bring them in one at a time. Add in the GPE between the new object and every object that has already been brought in to its final location. Working with conservative forces allows this "corner cut". The objects can move in at the same time following the lines that gravitation forces would require, or they can be brought in using the quite artificial method of holding the previous objects in place while bringing in the next one. The change of potential energy does not depend on the paths from start to finish.

You start with the first mass, then introduce the second , calculate the enrage needed, then the third and so on.