Orthogonal Matrices and the Singular Value Decomposition Carlo Tomasi The first Section below extends to $m\times n$ matrices the results on orthogonality and projection we have previously seen for vectors. The Sections thereafter use these concepts to introduce the Singular Value Decomposition (SVD) of a matrix, the pseudo-inverse, and its use for the solution of linear systems. ## 1 Orthogonal Matrices Let ${\cal S}$ be an $n$-dimensional subspace of ${\bf R}^{m}$ (so that we necessarily have $n\leq m$), and let ${\bf v}_{1},\ldots,{\bf v}_{n}$ be an orthonormal basis for ${\cal S}$. Consider a point $P$ in ${\cal S}$. If the coordinates of $P$ in ${\bf R}^{m}$ are collected in an $m$-dimensional vector $${\bf p}=\left[\begin{array}{c}p_{1}\\ \vdots\\ p_{m}\end{array}\right]\,$$ and since $P$ is in ${\cal S}$, it must be possible to write ${\bf p}$ as a linear combination of the ${\bf v}_{j}$s. In other words, there must exist coefficients $${\bf q}=\left[\begin{array}{c}q_{1}\\ \vdots\\ q_{n}\end{array}\right]$$ such that $${\bf p}=q_{1}{\bf v}_{1}+\ldots+q_{n}{\bf v}_{n}=V{\bf q}$$ where $$V=\left[\begin{array}{ccc}{\bf v}_{1}&\cdots&{\bf v}_{n}\end{array}\right]$$ is an $m\times n$ matrix that collects the basis for ${\cal S}$ as its columns. Then for any $i=1,\ldots,n$ we have $${\bf v}_{i}^{T}{\bf p}={\bf v}_{i}^{T}\sum_{j=1}^{n}q_{j}{\bf v}_{j}=\sum_{j=1 }^{n}q_{j}{\bf v}_{i}^{T}{\bf v}_{j}=q_{i}\,$$ since the ${\bf v}_{j}$ are orthonormal. This is important, and may need emphasis: _If_ $${\bf p}=\sum_{j=1}^{n}q_{j}{\bf v}_{j}$$ _and the vectors of the basis ${\bf v}_{1},\ldots,{\bf v}_{n}$ are orthonormal, then the coefficients $q_{j}$ are the signed magnitudes of the projections of ${\bf p}$ onto the basis vectors:_ $$q_{j}={\bf v}_{j}^{T}{\bf p}. \tag{1}$$In matrix form, $${\bf q}=V^{T}{\bf p}\;. \tag{2}$$ Also, we can collect the $n^{2}$ equations $${\bf v}_{i}^{T}{\bf v}_{j}=\left\{\begin{array}{ll}1&\mbox{ if }i=j\\ 0&\mbox{ otherwise}\end{array}\right.$$ into the following matrix equation: $$V^{T}V=I \tag{3}$$ where $I$ is the $n\times n$ identity matrix. A matrix $V$ that satisfies equation (3) is said to be _orthogonal_. Thus, a matrix is orthogonal if its columns are orthonormal. Since the _left inverse_ of a matrix $V$ is defined as the matrix $L$ such that $$LV=I\;, \tag{4}$$ comparison with equation (3) shows that the left inverse of an orthogonal matrix $V$ exists, and is equal to the transpose of $V$. Of course, this argument requires $V$ to be full rank, so that the solution $L$ to equation (4) is unique. However, $V$ is certainly full rank, because it is made of orthonormal columns. Notice that $VR=I$ cannot possibly have a solution when $m>n$, because the $m\times m$ identity matrix has $m$ linearly independent 1 columns, while the columns of $VR$ are linear combinations of the $n$ columns of $V$, so $VR$ can have at most $n$ linearly independent columns. Footnote 1: Nay, orthonormal. Of course, this result is still valid when $V$ is $m\times m$ and has orthonormal columns, since equation (3) still holds. However, for square, full-rank matrices ($r=m=n$), the distinction between left and right inverse vanishes, as we saw in class. Since the matrix $VV^{T}$ contains the inner products between the _rows_ of $V$ (just as $V^{T}V$ is formed by the inner products of its _columns_), the argument above shows that the rows of a _square_ orthogonal matrix are orthonormal as well. We can summarize this discussion as follows: **Theorem 1.1**: _The left inverse of an orthogonal $m\times n$ matrix $V$ with $m\geq n$ exists and is equal to the transpose of $V$:_ $$V^{T}V=I\;.$$ _In particular, if $m=n$, the matrix $V^{-1}=V^{T}$ is also the right inverse of $V$:_ $$V\mbox{ square}\quad\Rightarrow\;\;V^{-1}V=V^{T}V=VV^{-1}=VV^{T}=I\;.$$ Sometimes, when $m=n$, the geometric interpretation of equation (2) causes confusion, because two interpretations of it are possible. In the interpretation given above, the point $P$ remains the same, and the underlying reference frame is changed from the elementary vectors ${\bf e}_{j}$ (that is, from the columns of $I$) to the vectors ${\bf v}_{j}$ (that is, to the columns of $V$). Alternatively, equation (2) can be seen as a transformation, in a fixed reference system, of point $P$ with coordinates ${\bf p}$ into a different point $Q$ with coordinates ${\bf q}$. This, however, is relativity, and should not be surprising: If you spin clockwise on your feet, or if you stand still and the whole universe spins counterclockwise around you, the result is the same.2 Footnote 2: At least geometrically. One solution may be more efficient than the other in other ways. Consistently with either of these geometric interpretations, we have the following result: **Theorem 1.2**: _The norm of a vector ${\bf x}$ is not changed by multiplication by an orthogonal matrix $V$:_ $$\|V{\bf x}\|=\|{\bf x}\|\.$$ **Proof.** $$\|V{\bf x}\|^{2}={\bf x}^{T}V^{T}V{\bf x}={\bf x}^{T}{\bf x}=\|{\bf x}\|^{2}\.$$ $\Delta$ We conclude this section with an obvious but useful consequence of orthogonality. In an earlier note, we defined the projection ${\bf p}$ of a vector ${\bf b}$ onto another vector ${\bf c}$ as the point on the line through ${\bf c}$ that is closest to ${\bf b}$. This notion of projection can be extended from lines to vector spaces by the following definition: The _projection_${\bf p}$ of a point ${\bf b}\in{\bf R}^{n}$_onto a subspace_$C$ is the point in $C$ that is closest to ${\bf b}$. Also, for _unit_ vectors ${\bf c}$, the projection matrix is ${\bf c}{\bf c}^{T}$, and the vector ${\bf b}-{\bf p}$ is orthogonal to ${\bf c}$. An analogous result holds for subspace projection, as the following theorem shows. **Theorem 1.3**: _Let $U$ be an orthogonal matrix. Then the matrix $UU^{T}$ projects any vector ${\bf b}$ onto ${\rm range}(U)$. Furthermore, the difference vector between ${\bf b}$ and its projection ${\bf p}$ onto ${\rm range}(U)$ is orthogonal to ${\rm range}(U)$:_ $$U^{T}({\bf b}-{\bf p})={\bf 0}\.$$ **Proof.** A point ${\bf p}$ in ${\rm range}(U)$ is a linear combination of the columns of $U$: $${\bf p}=U{\bf x}$$ where ${\bf x}$ is the vector of coefficients (as many coefficients as there are columns in $U$). The squared distance between ${\bf b}$ and ${\bf p}$ is $$\|{\bf b}-{\bf p}\|^{2}=({\bf b}-{\bf p})^{T}({\bf b}-{\bf p})={\bf b}^{T}{\bf b }+{\bf p}^{T}{\bf p}-2{\bf b}^{T}{\bf p}={\bf b}^{T}{\bf b}+{\bf x}^{T}U^{T}U{ \bf x}-2{\bf b}^{T}U{\bf x}\.$$ Because of orthogonality, $U^{T}U$ is the identity matrix, so $$\|{\bf b}-{\bf p}\|^{2}={\bf b}^{T}{\bf b}+{\bf x}^{T}{\bf x}-2{\bf b}^{T}U{\bf x }\.$$ The derivative of this squared distance with respect to ${\bf x}$ is the vector $$2{\bf x}-2U^{T}{\bf b}$$ which is zero iff $${\bf x}=U^{T}{\bf b}\,$$ that is, when $${\bf p}=U{\bf x}=UU^{T}{\bf b}$$ as promised. For this value of ${\bf p}$ the difference vector ${\bf b}-{\bf p}$ is orthogonal to ${\rm range}(U)$, in the sense that $$U^{T}({\bf b}-{\bf p})=U^{T}({\bf b}-UU^{T}{\bf b})=U^{T}{\bf b}-U^{T}{\bf b}= {\bf 0}\.$$ ## 2 The Singular Value Decomposition Here is the main intuition captured by the Singular Value Decomposition (SVD) of a matrix: An $m\times n$ matrix $A$ of rank $r$ maps the $r$-dimensional unit hypersphere in $\text{rowspace}(A)$ into an $r$-dimensional hyperellipse in $\text{range}(A)$. Thus, a hypersphere is stretched or compressed into a hyperellipse, which is a quadratic hypersurface that generalizes the two-dimensional notion of ellipse to an arbitrary number of dimensions. In three dimensions, the hyperellipse is an ellipsoid, in one dimension it is a pair of points. In all cases, the hyperellipse in question is centered at the origin. For instance, the rank-2 matrix $$A=\frac{1}{\sqrt{2}}\left[\begin{array}{ccc}\sqrt{3}&\sqrt{3}\\ -3&3\\ 1&1\end{array}\right] \tag{5}$$ transforms the unit circle on the plane into an ellipse embedded in three-dimensional space. Figure 1 shows the map $$\mathbf{b}=A\mathbf{x}\.$$ Two diametrically opposite points on the unit circle are mapped into the two endpoints of the major axis of the ellipse, and two other diametrically opposite points on the unit circle are mapped into the two endpoints of the minor axis of the ellipse. The lines through these two pairs of points on the unit circle are always orthogonal. This result can be generalized to any $m\times n$ matrix. Simple and fundamental as this geometric fact may be, its proof by geometric means is cumbersome. Instead, we will prove it algebraically by first introducing the existence of the SVD and then using the latter to prove that matrices map hyperspheres into hyperellipses. Figure 1: The matrix in equation (5) maps a circle on the plane into an ellipse in space. The two small boxes are corresponding points. **Theorem 2.1**: _If $A$ is a real $m\times n$ matrix then there exist orthogonal matrices_ $$\begin{array}{rcl}U&=&\left[\begin{array}{ccc}{\bf u}_{1}&\cdots&{\bf u}_{m} \end{array}\right]\in{\cal R}^{m\times m}\\ V&=&\left[\begin{array}{ccc}{\bf v}_{1}&\cdots&{\bf v}_{n}\end{array}\right] \in{\cal R}^{n\times n}\end{array}$$ _such that_ $$U^{T}AV=\Sigma={\rm diag}(\sigma_{1},\ldots,\sigma_{p})\in{\cal R}^{m\times n}$$ _where $p=\min(m,n)$ and $\sigma_{1}\geq\ldots\geq\sigma_{p}\geq 0$. Equivalently,_ $$A=U\Sigma V^{T}\.$$ The columns of $V$ are the _right singular vectors_ of $A$, and those of $U$ are its _left singular vectors_. The diagonal entries of $\Sigma$ are the _singular values_ of $A$. The ratio $$\kappa(A)=\sigma_{1}/\sigma_{p} \tag{6}$$ is the _condition number_ of $A$, and is possibly infinite. **Proof.** Let ${\bf x}$ and ${\bf y}$ be unit vectors in ${\bf R}^{n}$ and ${\bf R}^{m}$, respectively, and consider the bilinear form $$z={\bf y}^{T}A{\bf x}\.$$ The set $${\cal S}\,=\,\{{\bf x},\,{\bf y}\,\,|\,{\bf x}\in{\bf R}^{n},\,\,{\bf y}\in{ \bf R}^{m},\,\,\|{\bf x}\|=\|{\bf y}\|=1\}$$ is compact, so that the scalar function $z({\bf x},{\bf y})$ must achieve a maximum value on ${\cal S}$, possibly at more than one point 3. Let ${\bf u}_{1},\,{\bf v}_{1}$ be two unit vectors in ${\bf R}^{m}$ and ${\bf R}^{n}$ respectively where this maximum is achieved, and let $\sigma_{1}$ be the corresponding value of $z$: Footnote 3: Actually, at least at two points: if ${\bf u}_{1}^{T}A{\bf v}_{1}$ is a maximum, so is $(-{\bf u}_{1})^{T}A(-{\bf v}_{1})$. $$\max_{\|{\bf x}\|=\|{\bf y}\|=1}{\bf y}^{T}A{\bf x}={\bf u}_{1}^{T}A{\bf v}_{1 }=\sigma_{1}\.$$ It is easy to see that ${\bf u}_{1}$ is parallel to the vector $A{\bf v}_{1}$. If this were not the case, their inner product ${\bf u}_{1}^{T}A{\bf v}_{1}$ could be increased by rotating ${\bf u}_{1}$ towards the direction of $A{\bf v}_{1}$, thereby contradicting the fact that ${\bf u}_{1}^{T}A{\bf v}_{1}$ is a maximum. Similarly, by noticing that $${\bf u}_{1}^{T}A{\bf v}_{1}={\bf v}_{1}^{T}A^{T}{\bf u}_{1}$$ and repeating the argument above, we see that ${\bf v}_{1}$ is parallel to $A^{T}{\bf u}_{1}$. The vectors ${\bf u}_{1}$ and ${\bf v}_{1}$ can be extended into orthonormal bases for ${\bf R}^{m}$ and ${\bf R}^{n}$, respectively. Collect these orthonormal basis vectors into orthogonal matrices $U_{1}$ and $V_{1}$. Then $$U_{1}^{T}AV_{1}=S_{1}=\left[\begin{array}{cc}\sigma_{1}&{\bf 0}^{T}\\ {\bf 0}&A_{1}\end{array}\right]\.$$ In fact, the first column of $AV_{1}$ is $A{\bf v}_{1}=\sigma_{1}{\bf u}_{1}$, so the first entry of $U_{1}^{T}AV_{1}$ is ${\bf u}_{1}^{T}\sigma_{1}{\bf u}_{1}=\sigma_{1}$, and its other entries are ${\bf u}_{j}^{T}A{\bf v}_{1}=0$ because $A{\bf v}_{1}$ is parallel to ${\bf u}_{1}$ and therefore orthogonal, by construction, to$\mathbf{u}_{2},\ldots,\mathbf{u}_{m}$. A similar argument shows that the entries after the first in the first row of $S_{1}$ are zero: the row vector $\mathbf{u}_{1}^{T}A$ is parallel to $\mathbf{v}_{1}^{T}$, and therefore orthogonal to $\mathbf{v}_{2},\ldots,\mathbf{v}_{n}$, so that $\mathbf{u}_{1}^{T}A\mathbf{v}_{2}=\ldots=\mathbf{u}_{1}^{T}A\mathbf{v}_{n}=0$. The matrix $A_{1}$ has one fewer row and column than $A$. We can repeat the same construction on $A_{1}$ and write $$U_{2}^{T}A_{1}V_{2}=S_{2}=\left[\begin{array}{cc}\sigma_{2}&\mathbf{0}^{T} \\ \mathbf{0}&A_{2}\end{array}\right]$$ so that $$\left[\begin{array}{cc}1&\mathbf{0}^{T}\\ \mathbf{0}&U_{2}^{T}\end{array}\right]U_{1}^{T}AV_{1}\left[\begin{array}{cc} 1&\mathbf{0}^{T}\\ \mathbf{0}&V_{2}\end{array}\right]=\left[\begin{array}{cc}\sigma_{1}&0& \mathbf{0}^{T}\\ 0&\sigma_{2}&\mathbf{0}^{T}\\ \mathbf{0}&\mathbf{0}&A_{2}\end{array}\right]\.$$ This procedure can be repeated until $A_{k}$ vanishes (zero rows or zero columns) to obtain $$U^{T}AV=\Sigma$$ where $U^{T}$ and $V$ are orthogonal matrices obtained by multiplying together all the orthogonal matrices used in the procedure, and $$\Sigma=\mathrm{diag}(\sigma_{1},\ldots,\sigma_{p})\.$$ Since matrices $U$ and $V$ are orthogonal, we can premultiply the matrix product in the theorem by $U$ and postmultiply it by $V^{T}$ to obtain $$A=U\Sigma V^{T}\,$$ which is the desired result. It only remains to show that the elements on the diagonal of $\Sigma$ are nonnegative and arranged in non-increasing order. To see that $\sigma_{1}\geq\ldots\geq\sigma_{p}$ (where $p=\min(m,n)$), we can observe that the successive maximization problems that yield $\sigma_{1},\ldots,\sigma_{p}$ are performed on a sequence of sets each of which contains the next. To show this, we just need to show that $\sigma_{2}\leq\sigma_{1}$, and induction will do the rest. We have $$\begin{array}{rcl}\sigma_{2}&=&\max_{\|\hat{\mathbf{x}}\|=\|\hat{\mathbf{y }}\|=1}\hat{\mathbf{y}}^{T}A_{1}\hat{\mathbf{x}}=\max_{\|\hat{\mathbf{x}}\|= \|\hat{\mathbf{y}}\|=1}\left[\begin{array}{cc}0&\hat{\mathbf{y}}\end{array} \right]^{T}S_{1}\left[\begin{array}{c}0\\ \hat{\mathbf{x}}\end{array}\right]\\ &=&\max_{\|\hat{\mathbf{x}}\|=\|\hat{\mathbf{y}}\|=1}\left[\begin{array}{cc}0 &\hat{\mathbf{y}}\end{array}\right]^{T}U_{1}^{T}AV_{1}\left[\begin{array}{c} 0\\ \hat{\mathbf{x}}\end{array}\right]=&\max_{\|\mathbf{x}\|=\|\mathbf{y}\|=1} \mathbf{y}^{T}A\mathbf{x}\leq\sigma_{1}\.\\ &&\mathbf{x}^{T}\mathbf{v}_{1}=\mathbf{y}^{T}\mathbf{u}_{1}=0\end{array}$$ To explain the last equality above, consider the vectors $$\mathbf{x}=V_{1}\left[\begin{array}{c}0\\ \hat{\mathbf{x}}\end{array}\right]\quad\mbox{and}\quad\mathbf{y}=U_{1}\left[ \begin{array}{c}0\\ \hat{\mathbf{y}}\end{array}\right]\.$$ The vector $\mathbf{x}$ is equal to the unit vector $[0\ \hat{\mathbf{x}}]^{T}$ transformed by the orthogonal matrix $V_{1}$, and is therefore itself a unit vector. In addition, it is a linear combination of $\mathbf{v}_{2},\ldots,\mathbf{v}_{n}$, and is therefore orthogonal to $\mathbf{v}_{1}$. A similar argument shows that $\mathbf{y}$ is a unit vector orthogonal to $\mathbf{u}_{1}$. Because $\mathbf{x}$ and $\mathbf{y}$ thus defined belong to subsets (actually sub-spheres) of the unit spheres in $\mathbf{R}^{n}$ and $\mathbf{R}^{m}$, we conclude that $\sigma_{2}\leq\sigma_{1}$. The $\sigma_{i}$ are nonnegative because all these maximizations are performed on unit hyper-spheres. The $\sigma_{i}$s are maxima of the function $z(\mathbf{x},\mathbf{y})$ which always assumes both positive and negative values on any hyper-sphere: If $z(\mathbf{x},\mathbf{y})$ is negative, then $z(-\mathbf{x},\mathbf{y})$ is positive, and if $\mathbf{x}$ is on a hyper-sphere, so is $-\mathbf{x}$. $\Delta$ [MISSING_PAGE_FAIL:7] Finally, both the 2-norm and the Frobenius norm $$\|A\|_{F}=\sqrt{\sum_{i=1}^{m}\sum_{j=1}^{n}|a_{ij}|^{2}}$$ and $$\|A\|_{2}=\sup_{{\bf x}\neq 0}\frac{\|A{\bf x}\|}{\|{\bf x}\|}$$ are neatly characterized in terms of the SVD: $$\|A\|_{F}^{2} = \sigma_{1}^{2}+\ldots+\sigma_{p}^{2}$$ $$\|A\|_{2} = \sigma_{1}\.$$ In the next few sections we introduce fundamental results and applications that testify to the importance of the SVD. ## 3 The Pseudoinverse One of the most important applications of the SVD is the solution of linear systems in the least squares sense. A linear system of the form $$A{\bf x}={\bf b} \tag{7}$$ arising from a real-life application may or may not admit a solution, that is, a vector ${\bf x}$ that satisfies this equation exactly. Often more measurements are available than strictly necessary, because measurements are unreliable. This leads to more equations than unknowns (the number $m$ of rows in $A$ is greater than the number $n$ of columns), and equations are often mutually incompatible because they come from inexact measurements. Even when $m\leq n$ the equations can be incompatible, because of errors in the measurements that produce the entries of $A$. In these cases, it makes more sense to find a vector ${\bf x}$ that minimizes the norm $$\|A{\bf x}-{\bf b}\|$$ of the _residual_ vector $${\bf r}=A{\bf x}-{\bf b}\.$$ where the double bars henceforth refer to the Euclidean norm. Thus, ${\bf x}$ cannot exactly satisfy any of the $m$ equations in the system, but it tries to satisfy all of them as closely as possible, as measured by the sum of the squares of the discrepancies between left- and right-hand sides of the equations. In other circumstances, not enough measurements are available. Then, the linear system (7) is under-determined, in the sense that it has fewer independent equations than unknowns (its rank $r$ is less than $n$). Incompatibility and under-determinacy can occur together: the system admits no solution, and the least-squares solution is not unique. For instance, the system $$x_{1}+x_{2} = 1$$ $$x_{1}+x_{2} = 3$$ $$x_{3} = 2$$has three unknowns, but rank 2, and its first two equations are incompatible: $x_{1}+x_{2}$ cannot be equal to both 1 and 3. A least-squares solution turns out to be ${\bf x}=[1\ 1\ 2]^{T}$ with residual ${\bf r}=A{\bf x}-{\bf b}=[1\ -1\ 0]$, which has norm $\sqrt{2}$ (admittedly, this is a rather high residual, but this is the best we can do for this problem, in the least-squares sense). However, any other vector of the form $${\bf x}^{\prime}=\left[\begin{array}{c}1\\ 1\\ 2\end{array}\right]+\alpha\left[\begin{array}{c}-1\\ 1\\ 0\end{array}\right]$$ is as good as ${\bf x}$. For instance, ${\bf x}^{\prime}=[0\ 2\ 2]$, obtained for $\alpha=1$, yields exactly the same residual as ${\bf x}$ (check this). In summary, an exact solution to the system (7) may not exist, or may not be unique. An approximate solution, in the least-squares sense, always exists, but may fail to be unique. If there are several least-squares solutions, all equally good (or bad), then one of them turns out to be shorter than all the others, that is, its norm $\|{\bf x}\|$ is smallest. One can therefore redefine what it means to "solve" a linear system so that there is always exactly one solution. This minimum norm solution is the subject of the following theorem, which both proves uniqueness and provides a recipe for the computation of the solution. **Theorem 3.1**: _The minimum-norm least squares solution to a linear system $A{\bf x}={\bf b}$, that is, the shortest vector ${\bf x}$ that achieves the_ $$\min_{{\bf x}}\|A{\bf x}-{\bf b}\|\,$$ _is unique, and is given by_ $$\hat{{\bf x}}=V\Sigma^{\dagger}U^{T}{\bf b} \tag{8}$$ _where_ $$\Sigma^{\dagger}=\left[\begin{array}{cccccc}1/\sigma_{1}&&&&0\ \ \cdots\ \ 0\\ &\ddots&&&&\\ &&1/\sigma_{r}&&&&\vdots&\vdots\\ &&&0&&&&\\ &&&\ddots&&&\\ &&&&0\ \ 0\ \cdots\ \ 0\end{array}\right]$$ _is an $n\times m$ diagonal matrix._ The matrix $$A^{\dagger}=V\Sigma^{\dagger}U^{T}$$ is called the _pseudoinverse_ of $A$. **Proof.** The minimum-norm Least Squares solution to $$A{\bf x}={\bf b}$$ is the shortest vector ${\bf x}$ that minimizes $$\|A{\bf x}-{\bf b}\|$$ that is, $$\|U\Sigma V^{T}{\bf x}-{\bf b}\|\.$$ [MISSING_PAGE_FAIL:10] as promised. The residual, that is, the norm of $\|A{\bf x}-{\bf b}\|$ when ${\bf x}$ is the solution vector, is the norm of $\Sigma{\bf y}-{\bf c}$, since this vector is related to $A{\bf x}-{\bf b}$ by an orthogonal transformation (see equation (9)). In conclusion, the square of the residual is $$\|A{\bf x}-{\bf b}\|^{2}=\|\Sigma{\bf y}-{\bf c}\|^{2}=\sum_{i=r+1}^{m}c_{i}^{2 }=\sum_{i=r+1}^{m}({\bf u}_{i}^{T}{\bf b})^{2}$$ which is the projection of the right-hand side vector ${\bf b}$ onto the complement of the range of $A$. $\Delta$ ## 4 Least-Squares Solution of a Homogeneous Linear Systems Theorem 3.1 works regardless of the value of the right-hand side vector ${\bf b}$. When ${\bf b}={\bf 0}$, that is, when the system is _homogeneous_, the solution is trivial: the minimum-norm solution to $$A{\bf x}={\bf 0} \tag{10}$$ is $${\bf x}=0\,$$ which happens to be an exact solution. Of course it is not necessarily the only one (any vector in the null space of $A$ is also a solution, by definition), but it is obviously the one with the smallest norm. Thus, ${\bf x}=0$ is the minimum-norm solution to any homogeneous linear system. Although correct, this solution is not too interesting. In many applications, what is desired is a _nonzero_ vector ${\bf x}$ that satisfies the system (10) as well as possible. Without any constraints on ${\bf x}$, we would fall back to ${\bf x}=0$ again. For homogeneous linear systems, the meaning of a least-squares solution is therefore usually modified, once more, by imposing the constraint $$\|{\bf x}\|=1$$ on the solution. Unfortunately, the resulting constrained minimization problem does not necessarily admit a _unique_ solution. The following theorem provides a recipe for finding this solution, and shows that there is in general a whole hypersphere of solutions. **Theorem 4.1**: _Let_ $$A=U\Sigma V^{T}$$ _be the singular value decomposition of $A$. Furthermore, let ${\bf v}_{n-k+1},\ldots,{\bf v}_{n}$ be the $k$ columns of $V$ whose corresponding singular values are equal to the last singular value $\sigma_{n}$, that is, let $k$ be the largest integer such that_ $$\sigma_{n-k+1}=\ldots=\sigma_{n}\.$$ _Then, all vectors of the form_ $${\bf x}=\alpha_{1}{\bf v}_{n-k+1}+\ldots+\alpha_{k}{\bf v}_{n} \tag{11}$$ _with_ $$\alpha_{1}^{2}+\ldots+\alpha_{k}^{2}=1 \tag{12}$$_are unit-norm least squares solutions to the homogeneous linear system_ $$A{\bf x}={\bf 0},$$ _that is, they achieve the_ $$\min_{\|{\bf x}\|=1}\|A{\bf x}\|\.$$ Note: when $\sigma_{n}$ is greater than zero the most common case is $k=1$, since it is very unlikely that different singular values have _exactly_ the same numerical value. When $A$ is rank deficient, on the other case, it may often have more than one singular value equal to zero. In any event, if $k=1$, then the minimum-norm solution is unique, ${\bf x}={\bf v}_{n}$. If $k>1$, the theorem above shows how to express _all_ solutions as a linear combination of the last $k$ columns of $V$. **Proof.** The reasoning is very similar to that for the previous theorem. The unit-norm Least Squares solution to $$A{\bf x}={\bf 0}$$ is the vector ${\bf x}$ with $\|{\bf x}\|=1$ that minimizes $$\|A{\bf x}\|$$ that is, $$\|U\Sigma V^{T}{\bf x}\|\.$$ Since orthogonal matrices do not change the norm of vectors they are applied to (theorem 1.2), this norm is the same as $$\|\Sigma V^{T}{\bf x}\|$$ or, with ${\bf y}=V^{T}{\bf x}$, $$\|\Sigma{\bf y}\|\.$$ Since $V$ is orthogonal, $\|{\bf x}\|=1$ translates to $\|{\bf y}\|=1$. We thus look for the unit-norm vector ${\bf y}$ that minimizes the norm (squared) of $\Sigma{\bf y}$, that is, $$\sigma_{1}^{2}y_{1}^{2}+\ldots+\sigma_{n}^{2}y_{n}^{2}\.$$ This is obviously achieved by concentrating all the (unit) mass of ${\bf y}$ where the $\sigma$s are smallest, that is by letting $$y_{1}=\ldots=y_{n-k}=0. \tag{13}$$ From ${\bf y}=V^{T}{\bf x}$ we obtain ${\bf x}=V{\bf y}=y_{1}{\bf v}_{1}+\ldots+y_{n}{\bf v}_{n}$, so that equation (13) is equivalent to equation (11) with $\alpha_{1}=y_{n-k+1},\ldots,\alpha_{k}=y_{n}$, and the unit-norm constraint on ${\bf y}$ yields equation (12). $\Delta$