Imagine we are trying to fit a curve to a set of data.
In many practical cases, we have more data than parameters we want to find.
Such situations create what is called overdetermined linear equation systems.
This system has a special characteristic. The number of equations is greater than the number of unknown variables.
Mathematically, if we have m equations and n variables,
then the condition m>n makes this system "overdetermined".
Now, how do we use this data to find the parabola parameters?
The idea is simple. For each data point, we can write one equation.
With 7 data points, we will get 7 equations.
a2⋅(−3)2+a1⋅(−3)+a0=−2.2
a2⋅(−2)2+a1⋅(−2)+a0=−4.2
a2⋅(−1)2+a1⋅(−1)+a0=−4.2
a2⋅02+a1⋅0+a0=−1.8
a2⋅12+a1⋅1+a0=1.8
a2⋅22+a1⋅2+a0=8.2
a2⋅32+a1⋅3+a0=15.8
Now let's calculate the square values for each ti.
For example, for t1=−3, we have (−3)2=9.
Similarly for the others. After calculating everything, our equations become like this.
Now we face an interesting situation. In our example, matrix A has size 7×3
and vector x has size 3×1.
This means we have 7 equations but only 3 unknown variables.
Does this mean the system cannot be solved? Let's examine this more carefully.
The three columns of matrix A are linearly independent, so the rank of matrix A is 3.
However, when we add vector b to matrix A
to form the augmented matrix (A∣b), its rank becomes 4.
This condition tells us something important. This system has no exact solution.
In simple terms, there is no single parabola that can pass through all 7 data points perfectly.
When an overdetermined linear equation system has no exact solution,
we use the least squares approach. The basic idea makes perfect sense.
If we cannot find a parabola that passes through all points,
let's find the parabola that is "closest" to all points.
Mathematically, this method seeks parameters that minimize the sum of squared differences
between predicted values and observed values. Imagine we draw a parabola,
then measure the vertical distance from each data point to that parabola.
The least squares method finds the parabola that makes the total squared distances as small as possible.
Overdetermined linear equation systems are very common in the real world,
especially when we have many measurement data but a relatively simple model.
The least squares approach provides an optimal solution in the sense of minimizing
overall error, making it very practical for engineering and scientific applications.