Attic › Mathematics › Adrien-Marie Legendre
Legendre published the first method of least squares to find the true path of comets from imperfect data
About Least squares
In 1805, Legendre published (as an appendix of 1806 in some accounts) the method of least squares, a mathematical rule for finding the most accurate answer from a set of imperfect measurements. Astronomers needed this method to calculate the orbits of comets, and it is now a standard tool in statistics and data science.
When astronomers observe a comet on different nights, every measurement of its position contains a small human or instrument error. Astronomers usually make dozens of observations to be sure of the path. Because each measurement has a slight error, no single orbit can pass through all the observed points at the same time. Before 1805, scientists had no standard rule to combine more equations than unknown variables, and different astronomers got different orbits from the same data.
Legendre solved this problem in the appendix of his book on comet orbits. He defined the error (e) of an observation as the difference between the actual measurement and the value predicted by a calculated orbit. To find the single best orbit, his method follows three steps:
1. Take the error (e) for each observation and multiply it by itself to get the square of the error (e²).
2. Add all the squared errors together (e₁² + e₂² + e₃² + ...).
3. Use calculus to find the values for the orbit's variables that make this total sum as small as possible.
Squaring the errors solves two mathematical problems at once. First, an error can be positive (too high) or negative (too low). If you simply add the errors together, a positive error and a negative error will cancel each other out, which makes a bad orbit look accurate. Because the square of any real number is positive, squaring the errors prevents them from canceling. Second, squaring makes large errors much bigger than small ones (for example, an error of 4 becomes 16, while an error of 1 stays 1). Because the method must keep the total sum small, it forces the calculated path to avoid large errors, even at the cost of allowing several tiny errors.
Legendre also gave the method its name. However, in 1809, Carl Friedrich Gauss published the same method and connected it to the laws of probability. Gauss stated that he had used least squares since 1795, ten years before Legendre's book. Legendre was angry that a younger rival took credit for his published discovery, and the priority dispute over least squares started a lifelong bitterness toward Gauss. Today, historians agree that Gauss found the method first, but Legendre was the first to publish it and give it to the scientific world.
Fact-checked against Adrien-Marie Legendre on Wikipedia
Part of the Mathematics syllabus: Gauss and Number Theory
See it on the timeline of Gauss and Number Theory