Skip to content
AI360Xpert
Beta

Compact Operators

Compact operators are infinite-dimensional maps that behave almost like finite matrices: they squash bounded sets small and surrender to low-rank approximation with known error.

Five singular bars shrink toward zero with the rank 3 cutoff leaving a tail error of 0.25
Five singular bars shrink toward zero with the rank 3 cutoff leaving a tail error of 0.25

Why Does This Exist?

Kernel integral equations, covariance operators and attention matrices are infinite-dimensional yet practically low-rank: a few modes carry the action. Compactness is the property that makes this rigorous. It guarantees discrete spectra, approximability by finite matrices, and the Fredholm alternative (finite-dimensional-flavored solvability) for equations that otherwise resist all matrix intuition.

This page defines compactness and truncates one operator with exact error. Matrix factors behind the truncation are in singular value decomposition; the eigenvalue picture is eigenvalues and eigenvectors.

The one idea you need first

A finite-rank operator has finite-dimensional range: Tx=∑k=1r⟨x,uk⟩vkTx = \sum_{k=1}^r \langle x, u_k \rangle v_k. Operator norm ∥T∥\|T\| is the top stretch factor. Compactness means finite-rank maps approximate TT in that norm.

Think of It Like This

A photo compressed to thumbnails

A 40-megapixel photo compresses to a crisp 2-megapixel version: thumbnails capture nearly everything because pixel detail beyond some fineness is noise. Compact operators are compressible photos: rank-rr thumbnails converge to the full image as rr grows.

A non-compact operator is television static: every zoom level shows fresh detail, no thumbnail ever suffices. Where it stops: compression error decays at the singular-value rate, which can be agonizingly slow. Compact promises convergence, never speed.

How It Actually Works

Bounded T:X→YT: X \to Y is compact when the image of the unit ball has compact closure: bounded inputs map to sets small enough that finite nets approximate them. Equivalently, TT is a norm limit of finite-rank operators:

∥T−Tr∥→0for finite-rank Tr\|T - T_r\| \to 0 \quad \text{for finite-rank } T_r

In plain words: truncate and the worst-case error vanishes as rank grows. On Hilbert space, compact TT has a singular expansion Tx=∑sk⟨x,uk⟩vkTx = \sum s_k \langle x, u_k \rangle v_k with sk→0s_k \to 0; truncation error is sr+1s_{r+1}. Hilbert-Schmidt operators (∑sk2<∞\sum s_k^2 < \infty) are the tractable subclass. Fredholm: I−TI - T is injective iff surjective, with finite-dimensional kernel.

Worked example

Diagonal DD on ℓ2\ell^2 with entries 1,1/2,1/3,1/4,1/5,…1, 1/2, 1/3, 1/4, 1/5, \ldots. Singular values are the entries themselves, tending to 00: compact. Rank-3 truncation D3D_3 keeps the first three; error ∥D−D3∥=1/4=0.25\|D - D_3\| = 1/4 = 0.25 (largest dropped entry).

Hilbert-Schmidt check on the first three modes: 12+(1/2)2+(1/3)2=1+0.25+0.111=1.3611^2 + (1/2)^2 + (1/3)^2 = 1 + 0.25 + 0.111 = 1.361, so partial HS norm 1.361≈1.167\sqrt{1.361} \approx 1.167. Full ∑1/k2=π2/6≈1.645\sum 1/k^2 = \pi^2/6 \approx 1.645, HS norm ≈1.283\approx 1.283: finite, so Hilbert-Schmidt, hence compact twice over.

Code

Truncate the diagonal and read off the exact tail error.

import numpy as np

def truncation_error(s: np.ndarray, rank: int) -> tuple[float, float]:    kept_hs = float(np.sqrt((s[:rank] ** 2).sum()))  # HS norm of kept part    tail = float(s[rank]) if rank < s.size else 0.0  # operator error    return kept_hs, tail

s = 1.0 / np.arange(1, 11)print(truncation_error(s, 3))  # -> (1.167, 0.25)

Kept HS norm 1.1671.167, tail error 0.250.25: the hand numbers, reproduced.

Watch Out For

Assuming the identity is compact

Symptom: truncating the identity (or any isomorphism on infinite dimensions) with error stuck at 11 forever. Fix: the unit ball is non-compact in infinite dimensions; identity is never compact there. Check sk→0s_k \to 0 before truncating anything.

Reading compactness off slow tails

Symptom: singular values decay like 1/log⁡k1/\log k and rank-1000 still leaves error 0.140.14. Fix: compactness gives no rate; estimate the actual tail sr+1s_{r+1} for your rr and budget rank from that, not from the label.

The Quick Version

  • Compact operators map bounded sets to nearly finite sets and are norm limits of finite-rank maps.
  • Singular values tend to zero; rank-rr truncation error is the first dropped value.
  • Diagonal (1/k)(1/k) has rank-3 error 0.250.25 and HS norm about 1.281.28.
  • Hilbert-Schmidt (∑sk2<∞\sum s_k^2 < \infty) implies compact with a computable norm.
  • The identity on infinite dimensions is never compact.