The formal definition of gravitational force was introduced by Newton's law of universal gravitation. The success of Newtonian physics since the publication of Isaac Newton 's Principia in 1687 provided a framework with which to investigate the motion and forces associated with electricity and magnetism. Charles-Augustin de Coulomb showed in 1785 that the repulsive force between two electrically charged spheres obeys the same (up to a sign) force law as Newton's law of universal gravitation: the force between two bodies is directed along the line separating the bodies and its magnitude is proportional to the product of their charges (for gravitation, their masses) divided by the square of their distance apart. André-Marie Ampère showed in 1823 that the force between infinitesimal lengths of current-carrying wires similarly obeys an inverse-square law such that the force is directed along the line of separation between the wire elements.