← Module 04 / SVD & matrix tools

Lesson 04.1 · §3.12

What does a matrix stretch?

Follow orthogonal changes of coordinates and singular-value scaling, including rectangular matrices.

In this lesson 6 ideas
  1. Follow two perpendicular directions
  2. Build the map one direction at a time
  3. Connect SVD to the spectral theorem
  4. Transfer
  5. Explore the relationship
  6. Check your reasoning

Source scope: §3.12, PDF pages 20, 21. Numerical examples, experiments, added derivations, and practice are teaching supplements unless identified as source results.

Follow two perpendicular directions

Take A=[300010]A=\begin{bmatrix}3&0&0\\0&1&0\end{bmatrix}. It sends (x1,x2,x3)(x_1,x_2,x_3) to (3x1,x2)(3x_1,x_2). The first direction stretches by three, the second keeps its length, and the third disappears. A rectangular matrix can lose a direction even though it has no square-matrix eigenvector description.

The singular value decomposition (SVD) separates any real linear map into three understandable operations. Every A∈Rm×nA\in\mathbb R^{m\times n} has

A=UΣVT,U∈Rm×m,Σ∈Rm×n,V∈Rn×n.A=U\Sigma V^T,\qquad U\in\mathbb R^{m\times m},\quad \Sigma\in\mathbb R^{m\times n},\quad V\in\mathbb R^{n\times n}.

UU and VV are orthogonal. Their columns are orthonormal bases. The rectangular diagonal matrix Σ\Sigma has nonnegative singular values, sorted so that, for r=rank⁡(A)r=\operatorname{rank}(A),

σ1≥⋯≥σr>0,σi=0(r<i≤min⁡(m,n)).\sigma_1\ge\cdots\ge\sigma_r>0,\qquad \sigma_i=0\quad(r<i\le\min(m,n)).

At rank zero all singular values are zero; if r=min⁡(m,n)r=\min(m,n) there is no trailing list of zeros.

First VTV^T expresses the input in the right-singular basis. Then Σ\Sigma scales those coordinates, discards extra input coordinates when n>mn>m, or pads with zero output coordinates when m>nm>n. Finally UU rotates or reflects the output coordinates. Orthogonal factors preserve length; the middle factor changes it. These are operations on the vector, not camera movement.

Build the map one direction at a time

Write uiu_i and viv_i for columns of UU and VV. For every positive singular value, Avi=σiuiAv_i=\sigma_i u_i. Thus the coefficient viTxv_i^Tx measures how much of input xx lies along viv_i, and

Ax=∑i=1rσiui(viTx),A=∑i=1rσiuiviT.Ax=\sum_{i=1}^r\sigma_i u_i(v_i^Tx),\qquad A=\sum_{i=1}^r\sigma_i u_iv_i^T.

Each outer product has rank one. In the running example, A=3e1(2)(e1(3))T+e2(2)(e2(3))TA=3e_1^{(2)}(e_1^{(3)})^T+e_2^{(2)}(e_2^{(3)})^T. The superscripts indicate different ambient dimensions.

Connect SVD to the spectral theorem

The source derives the two symmetric products by substituting the factorization:

ATA=(UΣVT)TUΣVT=VΣTUTUΣVT=VΣTΣVT,AAT=UΣVT(UΣVT)T=UΣVTVΣTUT=UΣΣTUT.\begin{aligned} A^TA&=(U\Sigma V^T)^TU\Sigma V^T =V\Sigma^TU^TU\Sigma V^T=V\Sigma^T\Sigma V^T,\\ AA^T&=U\Sigma V^T(U\Sigma V^T)^T =U\Sigma V^TV\Sigma^TU^T=U\Sigma\Sigma^TU^T. \end{aligned}

The columns of VV are the right-singular vectors, eigenvectors of ATAA^TA. The columns of UU are the left-singular vectors, eigenvectors of AATAA^T. The two products have sizes n×nn\times n and m×mm\times m. Both have nonzero eigenvalues σ12,…,σr2\sigma_1^2,\ldots,\sigma_r^2, with zeros filling the remaining dimensions. Take square roots to recover the singular values, keeping only min⁡(m,n)\min(m,n) entries when listing them.

Source footnote 6. ATAA^TA and AATAA^T are positive semidefinite. Their eigenvalues are nonnegative, so these square roots are real. The source states existence of the SVD without giving a proof.

Transfer

For A=[020000]A=\begin{bmatrix}0&2\\0&0\\0&0\end{bmatrix}, identify the nonzero singular value and the lost input direction.

Follow the columns

Ae2=2e1Ae_2=2e_1 and Ae1=0Ae_1=0. The singular values are 2,02,0, and the lost direction is e1∈R2e_1\in\mathbb R^2. The two-dimensional output nullspace of ATA^T is a different space, inside R3\mathbb R^3.

Explore the relationship

Explore it yourself

Follow the SVD factors

Change a direction or a scale. Which quantities survive an orthogonal factor?

Preparing interactive controls…

xy0-3-2-11234mapped x

x = (0.9063, 0.4226); Ax = (1.7986, 0.6435); rank = 2.

Stage 3: (1.7986, 0.6435). Both input and output are two-dimensional.

A (the 2 × 3 view appends a zero column)
1.57830.8712
0.09471.3195

Dashed: original unit circle. Solid: image in coordinate units. Factors use rotations here; the theorem also allows reflections. The planar graph shows the first two coordinates; the rectangular sphere view and readout track the discarded coordinate.

Check your reasoning

Make a prediction

Can a 2 \u00d7 3 matrix have three positive singular values?