From a Two-by-Two Matrix to Its SVD
For a real matrix \(\mathbf{A}\), the singular value decomposition separates its action into an orthogonal change of input coordinates, a scaling along perpendicular directions, and an orthogonal change of output coordinates. In a two-by-two calculation, the main work is usually finding eigenvalues and eigenvectors of the Gram matrix \(\mathbf{A}^{\top}\mathbf{A}\), then tracking signs and normalization carefully.
For a nonsingular \(\mathbf{A}\), the eigenvalues of \(\mathbf{A}^{\top}\mathbf{A}\) are positive, and their square roots are the singular values. If \(\mathbf{v}_i\) is a unit eigenvector for eigenvalue \(\lambda_i\), the corresponding left singular vector is \(\mathbf{u}_i=\mathbf{A}\mathbf{v}_i/\sqrt{\lambda_i}\). The eigenvalues and singular values must be paired in the same order: the largest eigenvalue gives the first (largest) singular value.
The following formula makes the eigenvalue step explicit. It applies to any real symmetric two-by-two matrix. Its eigenvalues are the roots of its characteristic equation, obtained by setting the determinant of the matrix minus \(\lambda\mathbf{I}_2\) equal to zero.
Proof. Expanding the characteristic determinant gives \(\det(\mathbf{G}-\lambda\mathbf{I}_2)=(a-\lambda)(d-\lambda)-b^2=\lambda^2-(a+d)\lambda+(ad-b^2)\). The quadratic formula gives roots \(\bigl((a+d)\pm\sqrt{(a+d)^2-4(ad-b^2)}\bigr)/2\). The expression under the square root simplifies to \(a^2-2ad+d^2+4b^2=(a-d)^2+4b^2\), which proves the formula. \(\square\)
A Calculation with a Negative Eigenvalue of the Original Matrix
Worked Example: A Symmetric Matrix with Singular Values 3 and 1
Find a full SVD of \(\mathbf{A}=\begin{bmatrix}1&2\\2&1\end{bmatrix}\). First calculate the Gram matrix:
Its characteristic equation is \((5-\lambda)^2-16=0\), so \(5-\lambda=4\) or \(5-\lambda=-4\). Thus the eigenvalues are \(\lambda_1=9\) and \(\lambda_2=1\), in decreasing order. For \(\lambda_1=9\), the equation \((\mathbf{A}^{\top}\mathbf{A}-9\mathbf{I}_2)\mathbf{v}=\mathbf{0}\) gives \(-4v_1+4v_2=0\), so an eigenvector is \((1,1)^{\top}\). For \(\lambda_2=1\), it gives \(4v_1+4v_2=0\), so an eigenvector is \((1,-1)^{\top}\). Both have length \(\sqrt{2}\), giving the unit vectors
The singular values are \(\sigma_1=\sqrt{9}=3\) and \(\sigma_2=\sqrt{1}=1\). Applying \(\mathbf{A}\) to the right singular vectors gives
Dividing each image by its singular value produces unit left singular vectors \(\mathbf{u}_1=(1,1)^{\top}/\sqrt{2}\) and \(\mathbf{u}_2=(-1,1)^{\top}/\sqrt{2}\). Therefore
Check. Multiplying the first two factors gives \(\frac{1}{\sqrt{2}}\begin{bmatrix}3&-1\\3&1\end{bmatrix}\). Multiplying by \(\mathbf{V}^{\top}\) then gives \(\frac12\begin{bmatrix}3-1&3+1\\3+1&3-1\end{bmatrix}=\begin{bmatrix}1&2\\2&1\end{bmatrix}=\mathbf{A}\). Also, the columns of each of \(\mathbf{U}\) and \(\mathbf{V}\) are unit vectors with dot product zero, so both factors are orthogonal.
Here \(\mathbf{A}\mathbf{v}_2=-\mathbf{v}_2\), but the singular value is positive: \(\sigma_2=1\). The negative sign is carried by the direction of \(\mathbf{u}_2\), not by \(\boldsymbol{\Sigma}\).
Why the Construction Gives a Factorization
The calculations above use a procedure that works for any nonsingular real two-by-two matrix once an orthonormal eigenbasis of its Gram matrix has been found. Earlier material on orthonormal eigenbases establishes that a real symmetric matrix has such a basis; \(\mathbf{A}^{\top}\mathbf{A}\) is symmetric. Here is a direct verification of why the procedure gives the required factors.
Proof. First, each eigenvalue is positive. For either eigenvector \(\mathbf{v}_i\ne\mathbf{0}\), \(\lambda_i\mathbf{v}_i^{\top}\mathbf{v}_i=\mathbf{v}_i^{\top}\mathbf{A}^{\top}\mathbf{A}\mathbf{v}_i=(\mathbf{A}\mathbf{v}_i)^{\top}(\mathbf{A}\mathbf{v}_i)>0\), because \(\mathbf{A}\) is nonsingular and hence \(\mathbf{A}\mathbf{v}_i\ne\mathbf{0}\). Thus \(\sigma_i>0\), so the definition of \(\mathbf{u}_i\) is valid. For \(i,j\in\{1,2\}\),
Therefore \(\mathbf{U}\) is orthogonal; \(\mathbf{V}\) is orthogonal because its columns were assumed orthonormal. Also, \(\mathbf{A}\mathbf{v}_i=\sigma_i\mathbf{u}_i\) for each \(i\), so the two columns of \(\mathbf{A}\mathbf{V}\) are exactly the columns of \(\mathbf{U}\boldsymbol{\Sigma}\). Hence \(\mathbf{A}\mathbf{V}=\mathbf{U}\boldsymbol{\Sigma}\). Multiplying on the right by \(\mathbf{V}^{\top}\), and using \(\mathbf{V}\mathbf{V}^{\top}=\mathbf{I}_2\), yields \(\mathbf{A}=\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top}\). \(\square\)
A Nonsymmetric Example with Different Left and Right Vectors
Worked Example: Singular Values 3 and 1 with Rotated Output Directions
Consider \(\mathbf{A}=\frac{1}{\sqrt{2}}\begin{bmatrix}-1&1\\3&3\end{bmatrix}\). Its Gram matrix is
The characteristic equation is \((5-\lambda)^2-16=0\), with eigenvalues \(9\) and \(1\). Solving the corresponding equations gives unit eigenvectors \(\mathbf{v}_1=(1,1)^{\top}/\sqrt{2}\) and \(\mathbf{v}_2=(1,-1)^{\top}/\sqrt{2}\): the first satisfies \(\begin{bmatrix}5&4\\4&5\end{bmatrix}\mathbf{v}_1=9\mathbf{v}_1\), and the second satisfies \(\begin{bmatrix}5&4\\4&5\end{bmatrix}\mathbf{v}_2=\mathbf{v}_2\). Thus \(\sigma_1=3\) and \(\sigma_2=1\).
Compute the images using the entries of \(\mathbf{A}\):
After division by the corresponding singular values, \(\mathbf{u}_1=(0,1)^{\top}\) and \(\mathbf{u}_2=(-1,0)^{\top}\). The full SVD is
Check. The product \(\mathbf{U}\boldsymbol{\Sigma}\) is \(\begin{bmatrix}0&-1\\3&0\end{bmatrix}\). Therefore
Both \(\mathbf{U}\) and \(\mathbf{V}\) have orthonormal columns: their columns have length \(1\) and dot product \(0\). This example shows why one must calculate the left vectors from \(\mathbf{A}\mathbf{v}_i/\sigma_i\); they need not equal the right vectors.
A Short Example with Coordinate Directions
Worked Example: A Matrix that Swaps the Output Axes
Find an SVD of \(\mathbf{B}=\begin{bmatrix}0&2\\3&0\end{bmatrix}\). Its Gram matrix and eigenpairs are
These right vectors are already unit vectors, and the singular values are \(\sigma_1=3\), \(\sigma_2=2\). Their images are \(\mathbf{B}\mathbf{v}_1=(0,3)^{\top}\) and \(\mathbf{B}\mathbf{v}_2=(2,0)^{\top}\), so the normalized left vectors are \(\mathbf{u}_1=(0,1)^{\top}\) and \(\mathbf{u}_2=(1,0)^{\top}\). Thus \(\mathbf{U}=\begin{bmatrix}0&1\\1&0\end{bmatrix}\), \(\boldsymbol{\Sigma}=\begin{bmatrix}3&0\\0&2\end{bmatrix}\), and \(\mathbf{V}^{\top}=\mathbf{I}_2\). Check: \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top}=\begin{bmatrix}0&2\\3&0\end{bmatrix}=\mathbf{B}\), and both orthogonal factors have orthonormal columns.
Common Errors and a Reliable Check
Do not confuse eigenvalues with singular values. For the first example, the eigenvalues of \(\mathbf{A}\) itself are \(3\) and \(-1\), but its singular values are \(3\) and \(1\). The singular values come from the square roots of the eigenvalues of \(\mathbf{A}^{\top}\mathbf{A}\), not from the eigenvalues of \(\mathbf{A}\). Using \(-1\) as a diagonal entry of \(\boldsymbol{\Sigma}\) would violate the definition that singular values are nonnegative.
A wrong calculation: in that example, taking \(\mathbf{u}_2=\mathbf{v}_2=(1,-1)^{\top}/\sqrt{2}\) because the matrix is symmetric would give \(\mathbf{A}\mathbf{v}_2=(1,-1)^{\top}/\sqrt{2}\). Direct multiplication instead gives \(\mathbf{A}\mathbf{v}_2=(-1,1)^{\top}/\sqrt{2}\). The correction is to calculate \(\mathbf{u}_2=\mathbf{A}\mathbf{v}_2/\sigma_2=(-1,1)^{\top}/\sqrt{2}\). This sign change is necessary for \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top}\) to reproduce \(\mathbf{A}\).
For any proposed full SVD, check three things: the diagonal entries of \(\boldsymbol{\Sigma}\) are nonnegative and decreasing; the columns of \(\mathbf{U}\) and \(\mathbf{V}\) are orthonormal; and direct multiplication gives \(\mathbf{A}\). When constructing the factors from the Gram matrix, also check \(\mathbf{A}^{\top}\mathbf{A}\mathbf{v}_i=\lambda_i\mathbf{v}_i\) and \(\mathbf{A}\mathbf{v}_i=\sigma_i\mathbf{u}_i\). These checks catch incorrect eigenvectors, mismatched ordering, and lost signs.
Check Your Understanding
For each calculation, keep eigenvalue order and singular-value order consistent, and verify proposed factors by multiplication.
- For \(\mathbf{A}=\begin{bmatrix}2&0\\0&1\end{bmatrix}\), find \(\mathbf{A}^{\top}\mathbf{A}\), its eigenvalues, and an SVD.
- For \(\mathbf{A}=\begin{bmatrix}1&2\\2&1\end{bmatrix}\), explain why the second left singular vector is not the second right singular vector.
- For \(\mathbf{G}=\begin{bmatrix}6&2\\2&3\end{bmatrix}\), use the two-by-two eigenvalue formula to find its eigenvalues.
- State why \(\mathbf{A}\mathbf{v}_i/\sigma_i\) is defined for a nonsingular \(\mathbf{A}\) when \(\mathbf{v}_i\) is an eigenvector of \(\mathbf{A}^{\top}\mathbf{A}\).
- Given proposed factors \(\mathbf{U},\boldsymbol{\Sigma},\mathbf{V}\), list the three checks that establish they form the claimed full SVD.