Solution (source code)

= Solution

For a bounded operator $A:X\to Y$ between <Hilbert spaces>, the <Moore--Penrose inverse of a Hilbert-space operator> is defined on
$$
\mathcal D(A^\dagger)=\mathcal R(A)\oplus\mathcal R(A)^\perp
$$
and has range $\mathcal R(A^\dagger)=\mathcal N(A)^\perp$. Its <Penrose equations> are
$$
AA^\dagger A=A,
\qquad
A^\dagger AA^\dagger=A^\dagger,
\qquad
(AA^\dagger)^*=AA^\dagger,
\qquad
(A^\dagger A)^*=A^\dagger A.
$$
Equivalently, $A^\dagger A=P_{\mathcal N(A)^\perp}$ and $AA^\dagger$ is the restriction of $P_{\overline{\mathcal R(A)}}$ to $\mathcal D(A^\dagger)$.