Solving Linear Equations (1)
Least Squares Analysis
In this article, we will discuss solving a specific case of linear equations, specifically considering the linear system
where . In this scenario, the number of unknowns is less than the number of equations, so it’s highly likely that is not in the range space of , meaning the system has no solution. However, we can obtain the least squares solution of this linear equation, i.e., there exists an such that for all , we have
This is called the least squares solution of the linear equation. When is in the solution space of , naturally becomes the solution of the equation. The least squares solution can be directly calculated using the following formula:
Proof process is as follows: Construct the objective function
Clearly, the function is a quadratic function. Since , this quadratic form is positive definite. Using the first-order necessary condition for a local minimum, we can find that the minimum point satisfies
The unique solution to this equation is , which is the least squares solution. The least squares method is a convenient algorithm for applications like line fitting.
Recursive Least Squares Method
The previous section introduced the least squares method, which we can use for line fitting. If we want to add a few more data sets to the fitting data, we can use the recursive least squares method, which makes partial corrections based on the previous fitting result. This means using the least squares solution obtained from the last fitting to get the least squares solution after adding data points.
For an optimization problem to find a suitable that minimizes , the solution is known as , where . If new data is added, represented by matrix and vector , then the problem becomes finding such that
is minimized. The iterative formula is:
The proof process is omitted here. In general, the iterative formula is:
For solving linear equations, we will also introduce the minimum norm solution and general solutions, as well as knowledge about pseudoinverses. To be continued…