Lunar theory attempts to account for the motions of the Moon. There are many small variations (or perturbations) in the Moon's motion, and many attempts have been made to account for them. After centuries of being problematic, lunar motion can now be modeled to a very high degree of accuracy (see section Modern developments). Lunar theory includes: the background of general theory; including mathematical techniques used to analyze the Moon's motion and to generate formulae and algorithms for predicting its movements; and also quantitative formulae, algorithms, and geometrical diagrams that may be used to compute the Moon's position for a given time; often by the help of tables based on the algorithms. Lunar theory has a history of over 2000 years of investigation. Its more modern developments have been used over the last three centuries for fundamental scientific and technological purposes, and are still being used in that way. Applications Applications of lunar theory have included the following: In the eighteenth century, comparison between lunar theory and observation was used to test Newton's law of universal gravitation by the motion of the lunar apogee. In the eighteenth and nineteenth centuries, navigational tables based on lunar theory, initially in the Nautical Almanac, were much used for the determination of longitude at sea by the method of lunar distances. In the very early twentieth century, comparison between lunar theory and observation was used in another test of gravitational theory, to test (and rule out) Simon Newcomb's suggestion that a well-known discrepancy in the motion of the perihelion of Mercury might be explained by a fractional adjustment of the power -2 in Newton's inverse square law of gravitation (the discrepancy was later successfully explained by the general theory of relativity). In the mid-twentieth century, before the development of atomic clocks, lunar theory and observation were used in combination to implement an astronomical time scale (ephemeris time) free of the irregularities of mean solar time. In the late twentieth and early twenty-first centuries, modern developments of lunar theory are being used in the Jet Propulsion Laboratory Development Ephemeris series of models of the Solar System, in conjunction with high-precision observations, to test the exactness of physical relationships associated with the general theory of relativity, including the strong equivalence principle, relativistic gravitation, geodetic precession, and the constancy of the gravitational constant. History The Moon has been observed for millennia. Over these ages, various levels of