Solution (source code)

= Solution

Use the <inner product> convention linear in its first argument. A <singular value system> consists of positive <singular values> $\sigma_n$ and <orthonormal bases> $u_n$ of $(\ker A)^\perp\subset X$ and $v_n$ of $\overline{\operatorname{ran}A}\subset Y$, with
$$
Au_n=\sigma_n v_n,\qquad A^*v_n=\sigma_nu_n.
$$
For an infinite-rank <compact operator>, $\sigma_n\to0$; a finite-rank operator has a finite system. Applying the <spectral theorem for compact self-adjoint operators> to $A^*A$ constructs $u_n$, with eigenvalues $\sigma_n^2$, and then $v_n=Au_n/\sigma_n$. This solution uses the input/output naming of this problem, which is the reverse of another common singular-vector convention.

The <Moore–Penrose inverse of an operator> is
$$
\boxed{x^\dagger=A^\dagger y=\sum_n\frac{\langle y,v_n\rangle}{\sigma_n}u_n.}
$$
Its domain is $\operatorname{ran}A\oplus(\operatorname{ran}A)^\perp$, equivalently the data satisfying the <Picard criterion>
$$
\sum_n\frac{|\langle y,v_n\rangle|^2}{\sigma_n^2}<\infty.
$$
It ignores the component in $\ker A^*$ and lies in $(\ker A)^\perp$. The series then converges in $X$ by orthonormality and is the <minimum-norm least-squares solution>. If $y\in\operatorname{ran}A$, it is an exact solution; all other exact solutions are $x^\dagger+z$ with $z\in\ker A$. Compactness does not make the inverse bounded when there are infinitely many positive singular values.