Vector form of Newton’s Law of Gravitation
Newton’s Law of Gravitation states that everybody in this universe attracts every other body with a force which is directly proportional to the product of their masses and is inversely proportional to the square of the distance between them.
Consider two points mass bodies A and B of masses m₁ and m₂ placed distance r apart.

Let,
\(\overrightarrow{{{r}_{12}}}\) = Unit vector from A to B.
\(\overrightarrow{{{r}_{21}}}\) = Unit vector from B toA.
\(\overrightarrow{{{F}_{21}}}\) = Gravitational force exerted on body A by body B.
\(\overrightarrow{{{F}_{21}}}\) = Gravitational force exerted on body B by body A.
According to Newton’s Law of Gravitation:
\(\overrightarrow{{{F}_{12}}}=-G\frac{{{m}_{1}}{{m}_{2}}}{{{r}^{2}}}\widehat{{{r}_{21}}}\).
Here, negative sign indicates that the direction of \(\overrightarrow{{{F}_{12}}}\) is opposite to that of \(\overrightarrow{{{F}_{21}}}\). In fact, the negative sign shows that the gravitational force is attractive in nature.
As, \(r=|\overrightarrow{{{r}_{12}}}|=|\overrightarrow{{{r}_{21}}}|\).
So,
\(\overrightarrow{{{F}_{12}}}=-\frac{G{{m}_{1}}{{m}_{2}}}{|\overrightarrow{{{r}_{21}}}{{|}^{2}}}\widehat{{{r}_{21}}}\) … (1)
Similarly, \(\overrightarrow{{{F}_{12}}}=-\frac{G{{m}_{1}}{{m}_{2}}}{|\overrightarrow{{{r}_{12}}}{{|}^{2}}}\widehat{{{r}_{12}}}=\frac{G{{m}_{1}}{{m}_{2}}}{|\overrightarrow{{{r}_{12}}}{{|}^{2}}}\widehat{{{r}_{21}}}\) … (2) \(\left[ \because \,\,\widehat{{{r}_{12}}}=-\widehat{{{r}_{21}}} \right]\).
From equations, (1) and (2), we have:
\(\overrightarrow{{{F}_{21}}}=-\overrightarrow{{{F}_{12}}}\). If \(\overrightarrow{{{r}_{1}}}\) and \(\overrightarrow{{{r}_{2}}}\) are the position vectors of point masses m₁ and m₂ at points A and B, as shown in below figure. Then,

\(\overrightarrow{{{r}_{12}}}=\overrightarrow{{{r}_{2}}}-\overrightarrow{{{r}_{1}}}\).
Now,
\(\overrightarrow{{{F}_{21}}}=-\frac{G{{m}_{1}}{{m}_{2}}}{{{r}^{3}}}\widehat{{{r}_{12}}}=-\frac{G{{m}_{1}}{{m}_{2}}}{|\overrightarrow{{{r}_{12}}}{{|}^{3}}}\widehat{{{r}_{12}}}\).
\(\overrightarrow{{{F}_{21}}}=-\frac{G{{m}_{1}}{{m}_{2}}}{|\overrightarrow{{{r}_{2}}}-\overrightarrow{{{r}_{1}}}{{|}^{3}}}\left( \overrightarrow{{{r}_{2}}}-\overrightarrow{{{r}_{1}}} \right)\).