Skip to article frontmatterSkip to article content

3.4Back to least squares: existence, uniqueness, and expression of solutions

Given yRmy \in \mathbb{R}^m and ARm×nA\in \mathbb{R}^{m\times n} a general linear least squares problem is written as

minimizeyAx22subject toxRn\begin{array}{ll} \minimize& \Vert y - A x\Vert_2^2\\ \st & x \in \mathbb{R}^n \end{array}

As we already saw, this is an unconstrained quadratic program with Q=AAQ = A^\top A and p=Ayp = A^\top y.

Setting the gradient to zero yields the so-called normal equations:

AAx=AyA^\top Ax = A^\top y

Existence of solutions

A few observations are in order:

Comparing with all possible cases for QPs, we only have two choices:

Typology of solutions

The rank of AA determines the number of solutions:

About the Moore-Penrose pseudo-inverse

Consider a linear system of equations y=Axy = Ax. Often the solution to this system is denoted by

x^=Ay\hat{x} = A^\dagger y

where AA^\dagger is the Moore-Penrose pseudo-inverse of AA. While it relates to least squares problems, they are some key subtleties to keep in mind: