A least-squares solution minimizes over the source Hilbert space. It exists exactly when , and then the solutions form a closed affine subspace with direction .
The orthogonal projection of a prescribed point onto the affine subspace of least-squares solutions is unique. It retains 's null space component and chooses the determined component from the Moore–Penrose inverse of an operator.
Use the Hilbert space interpretation of a linear inverse problem, with a bounded linear operator . A least-squares solution minimizes over . A minimum-norm least-squares solution additionally has the smallest -norm among all least-squares solutions. When the equation is consistent this is the smallest-norm exact solution.
The least-squares solutions form a nonempty closed affine subspace precisely when
The closest point theorem in a Hilbert space then gives a unique nearest point to zero, hence a unique minimum-norm least-squares solution. Equivalently, it is the unique least-squares solution in . If is closed, this exists for every datum; a nonclosed operator range can leave some data without any least-squares solution.
For example, on the l2 sequence space, take and . The equation would require for every , which is not square summable. However, setting the first coordinates of to one and the rest to zero gives
Thus the least-squares infimum is zero but is not attained, and no minimum-norm least-squares solution exists for these data.
The map is a bounded linear operator, so the inverse image of the closed singleton is closed. That inverse image is also a convex set: if , every convex combination has the same image.
The identity gives
Consequently such a exists exactly when is the sum of an element of and one of its orthogonal complement. Thus
These are precisely the least-squares solutions. Indeed, if and , then for every the Pythagorean identity gives
Conversely, differentiating the squared residual along any real direction forces , hence the normal equation for a linear inverse problem. For any , the difference of two solutions of the normal equation for a linear inverse problem lies in , since . Therefore
a closed affine subspace; the empty case is closed and convex as well.
Write . Every least-squares solution is for some , while . Decompose using orthogonal projections. Then the Pythagorean identity gives
The first term is independent of , and the second vanishes at exactly one point. Hence the unique nearest least-squares solution is
Geometrically this is the orthogonal projection of onto the closed affine subspace of least-squares solutions.
The Gaussian likelihood is proportional to
so maximum likelihood estimation is equivalent to ordinary least squares. If and has rank , then is invertible and the normal equations give
If , then and . A least-squares minimizer always exists, but it is not unique: by rank-deficient ordinary least squares, the complete set is
an affine subspace of dimension . Thus there are uncountably infinitely many likelihood maximizers. In the generic full-row-rank case their dimension is .
If a design matrix has deficient rank, every ordinary least squares minimizer has the form with , where is the Moore-Penrose inverse. Hence the fitted values are unique but the coefficients are not: the minimizers form an affine subspace of dimension .