Solution (source code)

= Solution

A full real <singular value decomposition> is
$$
\boxed{A=U\Sigma V^T,\quad U\in\mathbb R^{m\times m},\quad V\in\mathbb R^{n\times n},\quad U^TU=I_m,\quad V^TV=I_n,}
$$
where $\Sigma\in\mathbb R^{m\times n}$ has only diagonal entries, with $\sigma_1\geq\cdots\geq\sigma_{\min(m,n)}\geq0$. These are the <singular values>. The number of positive <singular values> is the <matrix rank>. The columns of $V$ are right singular vectors and those of $U$ are left singular vectors, giving orthonormal input and output coordinate systems.