Suppose $A$ is square but not necessarily invertible and has SVD $\displaystyle A=\sum_{i=1}^r \sigma_i u_i v_i^T$. Let$$ B=\sum_{i=1}^r \frac{1}{\sigma_i}v_i u_i^T.$$ Show that $BA\,x = x$ for all $x$ in the span of the right-singular vectors of $A$. For this reason $B$ is sometimes called the pseudo-inverse of $A$ and can play the role of $A^{-1}$ in many applications.
What I have done so far:
\begin{align*} ABx &= \left(\sum_{i=1}^r \sigma_i u_i v_i^T\right)\left(\sum_{i=1}^r \frac{1}{\sigma_i}v_i u_i^T\right)x\\ &= (\sigma_1u_1v_1^T + \sigma_2u_2v_2^T + \cdots + \sigma_ru_rv_r^T)\left(\frac{1}{\sigma_1}v_iu_i^T + \cdots + \frac{1}{\sigma_r}v_ru_r^T\right)x\\ &= (u_1u_1^T + u_2u_2^T + \cdots + u_ru_r^T)x,\end{align*} and that is where I am stuck. I tried turning all the $u_iu_i^T$ to $\dfrac{Av_iv_i^TA^T}{\|Av_i\|_2^2}$, but it does not lead me anywhere.
Help would be appreciated.
$\def\T{^{\mathrm{T}}}$Suppose $A \in \mathrm{M}_{n × n}(\mathbb{C})$. Note that$$ BA = \left( \sum_{k = 1}^r \frac{1}{σ_k} v_k u_k\T \right) \left( \sum_{k = 1}^r σ_k u_k v_k\T \right) = \sum_{k = 1}^r v_k v_k\T, $$ and $v_1, \cdots, v_r$ is a basis of the span of the right-singular vectors of $A$. For any $1 \leqslant k \leqslant r$,$$ BA v_k = \sum_{j = 1}^r v_j v_j\T v_k = v_k, $$ thus for any $x$ in the span of the right-singular vectors of $A$,$$ BA x = x. $$