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.