(N/A) Newton's universal law of gravitation states that every body in the universe attracts every other body with a force that is directly proportional to the product of their masses and inversely proportional to the square of the distance between them.
This force acts along the line joining the centers of the two bodies.
This force is known as the gravitational force.
$\therefore \left|\overrightarrow{F}_{12}\right| = \left|\overrightarrow{F}_{21}\right| = \frac{G m_{1} m_{2}}{r^{2}}$
where $m_{1}$ and $m_{2}$ are the masses of the two bodies,$r$ is the distance between them,and $G$ is the universal gravitational constant.
According to the figure,$m_{1}$ and $m_{2}$ are two masses placed in a Cartesian coordinate system,and $\vec{r}_{1}$ and $\vec{r}_{2}$ are their respective position vectors.
The displacement vector from $m_{1}$ to $m_{2}$ is $\overrightarrow{r}_{12} = \vec{r}_{2} - \vec{r}_{1}$.
The unit vector in the direction of $\overrightarrow{r}_{12}$ is $\hat{r}_{12} = \frac{\overrightarrow{r}_{12}}{\left|\overrightarrow{r}_{12}\right|} = \frac{\vec{r}_{2} - \vec{r}_{1}}{r}$,where $r = \left|\overrightarrow{r}_{12}\right|$.
The gravitational force exerted on mass $m_{1}$ by mass $m_{2}$ is given by $\overrightarrow{F}_{12} = \frac{G m_{1} m_{2}}{r^{2}} \hat{r}_{21}$,where $\hat{r}_{21}$ is the unit vector from $m_{2}$ to $m_{1}$.