Singular value decomposition of column & row vectors

Solution 1:

Let $a\neq 0$, $u:=a/\|a\|_2$, and $\tilde{U}$ be $n\times (n-1)$ matrix with orthonormal columns such that $\tilde{U}^Ta=0$ (the columns of $\tilde{U}$ form an orthonormal basis of the orthogonal complement of $\mathrm{span}\{a\}$). You can easily verify that $[u,\tilde{U}]$ is a square orthogonal matrix.

With $U_{\mathrm{E}}:=u$, $\Sigma_{\mathrm{E}}:=\|a\|_2$, and $V_{\mathrm{E}}:=1$, we get the so-called economy SVD of $a$: $$\tag{1} a=U_{\mathrm{E}}\Sigma_{\mathrm{E}}V_{\mathrm{E}}^T. $$ With $U:=[u,\tilde{U}]$, $\Sigma:=[\|a\|_2,0,\ldots,0]^T$, $V:=1$, we get the full SVD of $a$: $$\tag{2} a=U\Sigma V^T. $$

If $a=0$, you can select $U$ to be an arbitrary orthogonal matrix (and $u$ its first column). Otherwise, the rest is the same.

For $a^T$, just transpose (1) and (2).