Understanding least squares solution and Moore-Penrose inverse

least squareslinear algebra

Consider the matrix vector equation $Ax=b$ with
$$
A = \begin{pmatrix}
1 & 2\\
2 & 4
\end{pmatrix},
\quad
b=
\begin{pmatrix}
4\\
8
\end{pmatrix}.
$$

Since the second row of matrix $A$ is a multiple of the first, $A^{-1}$ does not exist and the system has infinitely many solutions. The set of solutions is a line in $\mathbb{R}^2$ which satisfy
$$\label{abc}
x_1 + 2 x_2 = 4.
$$

However, calculating the Pseudo-Inverse $A^+$ of $A$ (using python or similar) is get a unique solution $x^+ = (0.8, 1.6)^T$.

As far as I understood correctly, the Pseudo-Inverse is an explicit way of calculating the least squares solution given by
$$
x^+ = \arg\min_x \frac{1}{2} || Ax – b||_2^2.
$$

This can be seen by using the singular value decomposition of $A$.

But obviously, all points satisfying $x_1+2x_2=4$ minimize the norm, hence there are infinitely many least squares solutions.

Why does the Pseudo-Inverse then give me a unique solution $x^+=(0.8, 1.6)^T$?

Thanks in advance.

Best Answer

In general, if $A\in \operatorname{mat}(\mathbb{R}^m,\mathbb{R}^n)$ and $b\in\mathbb{C}^n$, $x_*=A^+b$, where $A^+$ is the Moore-Penrose pseudo inverse, solves two problems simultaneously:

$$x_*=\operatorname{arg.min}\{\|x\|_2: x=\operatorname{arg.min}\|Ax-b\|_2\}$$ where $\|\;\|_2$ is the standard quadratic Euclidean norm, that is, if $x'$ is such that $\|Ax'-b\|_2=\min\{ \|Ay-b\|_2:y\in\mathbb{R}^n\}$, the $\|x_+\|_2\leq\|x'\|_2$.