A standard statistical method for fitting a model to data by minimizing the sum of squared residuals.Least squares is a statistical optimization method used to fit a mathematical model to observed data by minimizing the sum of the squares of the differences (residuals) between observed and predicted values. It is the foundational technique for regression analysis, enabling estimation of parameters in linear and nonlinear models. In physics, it is ubiquitous for extracting constants from experimental data, such as determining the gravitational constant or calibrating sensors.
Developed independently by Carl Friedrich Gauss (1795, published 1809) and Adrien-Marie Legendre (1805). Gauss used it to predict the orbit of the dwarf planet Ceres, demonstrating its power in astronomical data analysis.
Given a set of data points (x_i, y_i) and a model function y = f(x, parameters), the method adjusts the parameters to minimize Σ (y_i - f(x_i))². For linear models, this reduces to solving a system of normal equations, yielding closed-form solutions. For nonlinear models, iterative algorithms like Gauss-Newton or gradient descent are used. The squared penalty ensures that large errors are disproportionately penalized, leading to a best-fit line or curve that balances overall deviation.
Used in virtually every field of science and engineering — from fitting calibration curves in spectroscopy to estimating parameters in econometric models and machine learning algorithms.
The method's name comes from the fact that it minimizes the sum of squared residuals, but it also corresponds to the maximum likelihood estimate when errors are normally distributed — a connection established by Gauss.








