Solution (source code)

= Solution

Let $r$ be the <matrix rank>, and partition the right singular vectors as $V=(V_r\ V_0)$, with $V_0\in\mathbb R^{n\times(n-r)}$ consisting of the columns associated with zero <singular values>. From $Ax=0\iff\Sigma V^Tx=0$, these columns form an <orthonormal basis> of the <nullspace>. Therefore its <orthogonal projector> is
$$
\boxed{P_{\ker A}=V_0V_0^T=I_n-V_rV_r^T.}
$$
It acts on the input space $\mathbb R^n$. Symmetry and idempotence follow from $V_0^TV_0=I_{n-r}$. At full column rank it is zero, and at rank zero it is the identity.