Q:

Derive Gravitational law

How can I derive Newton's gravitational law?
$$F=G\frac{m_1 m_2}{r^2}$$
Is it impossible to derive?
Did Newton get this just by obervations?

A:

Newton did not derive this law. He used it to demonstrate Kepler's laws (e.g. elliptical motions of planets), which had been found by Kepler from observations by Tycho Brahe. 
Einstein showed how to derive the Newtonian law of gravity from Einstein's equation for gravity

