A1332 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A13 · Lesson 32 · The SVD

Rank, condition, best low-rank approximations and parallel channels

Every matrix, square or not, can be written as A=UΣVT: a rotation, a stretch along perpendicular axes by the singular values σ1≥σ2≥⋯≥0, and another rotation. The singular values answer the practical questions numerical work keeps asking. How close is this matrix to singular? What is its rank, really, once noise is counted? What is the best approximation using only k numbers per row and column? In communications they also give the gains of the independent channels hidden inside a multi-antenna link.

  • The dashed circle is the set of unit vectors x; the solid ellipse is where A=(abcd) sends them.
  • The ellipse's semi-axes are the singular values σ1 and σ2. Their ratio is the condition number.
  • Make the matrix nearly singular, for example a = d = 1 and b = c = 0.9: the ellipse flattens to a needle, σ2 approaches 0, and κ grows.

Predict

You compute a matrix's singular values as the square roots of the eigenvalues of ATA, in double precision. The matrix has κ = 109. What happens to its smallest singular value?

Name it

The decomposition

A=UΣVT with U and V orthogonal and Σ diagonal. The columns of V are the directions A stretches most and least; Avi=σiui. The σi2 are the eigenvalues of ATA, but software never computes them that way.

What the singular values tell you

  • Norm and condition: ‖A‖2=σ1, and κ2(A)=σ1/σn.
  • Numerical rank: the number of singular values above a tolerance, such as max⁡(m,n)εσ1, or the noise level of the data.
  • Distance to singularity: the nearest singular matrix is σn away in the 2-norm.

Best low-rank approximation

Keeping the k largest terms, Ak=∑i≤kσiuiviT, gives the best rank-k approximation (Eckart–Young): its error is σk+1 in the 2-norm and ∑i>kσi2 in the Frobenius norm. Storing Ak takes k(m+n+1) numbers instead of mn.

Least squares and regularization

The pseudoinverse A+=VΣ+UT (invert the nonzero σi) gives the minimum-norm least-squares solution. When small singular values are only noise, dividing by them amplifies it; truncated SVD drops them, trading a little bias for much less noise.

Parallel channels

A multi-antenna link y=Hx+n becomes independent scalar channels with gains σi after rotating by V at the transmitter and UT at the receiver. With power p per channel and unit noise, the capacity is ∑ilog2⁡(1+pσi2) bits per second per hertz.

Worked example

Find the singular values and condition number of A=(3045).

Show the solution
  1. Form ATA. For a small exact matrix this route is fine: ATA=(25202025) Its eigenvalues are 45 and 5.
  2. Singular values. σ1=45=6.708σ2=5=2.236
  3. Condition number. κ2=σ1/σ2=3
  4. Check. σ1σ2=225=15=|det⁡A| as it must for a square matrix.
  5. Eigenvalues understate it. The eigenvalues of A itself are 3 and 5, whose ratio, 53, understates how unevenly A stretches; for nonsymmetric matrices only the singular values measure that.

Answer σ1=6.708, σ2=2.236 and κ2=3.

Worked example

A 1000 × 1000 matrix of measurements is approximated by its 50 largest singular terms. How much storage does that take, and what is the error?

Show the solution
  1. Storage. Rank 50 needs 50×(1000+1000+1)=100050 numbers instead of 106: about 10% of the storage.
  2. Error. The error in the 2-norm is exactly σ51, so the singular value plot tells you in advance how much each extra term buys.
  3. When the values fall quickly. With smooth images or correlated sensor arrays, a small rank captures nearly everything.
  4. When they level off. If they level off at a noise floor, the terms beyond that point are noise, and dropping them cleans the data as well as compressing it.

Answer 100 050 numbers, about 10% of the full matrix, with a 2-norm error of exactly σ51.

Worked example

A 2 × 2 antenna link has singular values 2 and 0.5. With power 10 (relative to the noise) on each stream, what is its capacity?

Show the solution
  1. The strong stream. Each stream is an independent channel with gain σi: log2⁡(1+10×4)=5.36 bits per second per hertz.
  2. The weak stream. log2⁡(1+10×0.25)=1.81
  3. Total. The total is 7.16 bits per second per hertz.
  4. Compare with one antenna pair. A single pair with gain 2 would give 5.36: the second spatial channel adds a third more, even though it is four times weaker.
  5. Water-filling. Water-filling, which puts more power on the stronger channel, would do slightly better still.

Answer 7.16 bits per second per hertz: 5.36 from the strong stream and 1.81 from the weak one.

Check

A=(3043).

(a)

What is σ1?

(b)

What is κ2=σ1/σ2? (Use σ1σ2=|det⁡A|.)

Check

A matrix's singular values halve from each to the next, starting at σ1 = 10. What is the 2-norm error of its best rank-3 approximation?

Check

What fraction of the storage of a 1000 × 500 matrix does its rank-100 approximation need?

Check

A 2 × 2 antenna link has singular values 2 and 0.5, with power 100 per stream relative to the noise. What is its capacity per hertz?

Check

A matrix has κ=106. Solving least squares through ATA, about how many digits can be lost?

Check

A 100 × 100 matrix from measurements has singular values 50, 20, 8, 3, then 96 values all near 10−6, the noise level. What is its useful rank?

Check

A=(a−bba), a rotation times a scaling.

Step 1

What is the (1, 1) entry of ATA?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Check

A 2 × 2 antenna link has channel matrix H=(10.50.30.8). Set s to its singular values (np.linalg.svd(H, compute_uv=False)) and C to the capacity ∑log2⁡(1+10σi2), with power 10 per stream.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why is the truncated SVD the best low-rank approximation?

Practice

Keep practicing

7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.