# Definition:Method of Least Squares

## Definition

Let there be a set of points $\left\{ {\left({x_k, y_k}\right): k \in \left\{ {1, 2, \ldots, n}\right\} }\right\}$ plotted on a Cartesian $x y$ plane which correspond to measurements of a physical system.

Let it be required that a straight line is to be fitted to the points.

The **method of least squares** is a technique of producing a straight line of the form $y = m x + c$ such that:

- the points $\left\{ {\left({x_k', y_k'}\right): k \in \left\{ {1, 2, \ldots, n}\right\} }\right\}$ are on the line $y = m x + c$
- $\forall k \in \left\{ {1, 2, \ldots, n}\right\}: y_k' = y_k$
- $\displaystyle \sum_n \left({x_k' = x_k}\right)^2$ is minimised.

## Historical Note

The method of least squares was invented by Carl Friedrich Gauss.