advanced34 min studyLesson 310 in Mathematics

Randomized range finding and sketching

Build a compressed basis with random probes while separating expectation bounds from verified approximation error.

On this page

What you’ll understand

  • Construct a sampled range and compressed factorization from matrix probes.
  • Interpret a Gaussian expectation bound with its explicit oversampling assumptions.
  • Explain power iteration, orthogonalization, and independent validation costs.

When a matrix is too large for a complete factorization, a few carefully chosen probes can reveal most of its important output space. Randomized range finding multiplies the matrix by a small random test matrix, orthonormalizes the result, and compresses the remaining calculation. Its reliability is probabilistic and spectrum dependent. A successful demonstration is not a guarantee for every random draw, and an expectation bound is not a deterministic error certificate for the approximation in hand.

Sampling the range is only the first stage

For a real m-by-n matrix A, choose a test matrix Ω with n rows and ℓ columns and form Y=AΩ. An orthonormal basis Q for the sampled range gives the approximation QQᵀA. The small matrix B=QᵀA can then be factored deterministically; for example an SVD of B lifts to an approximate SVD of A by multiplying its left singular vectors by Q. The multiplication QᵀA is a separate operation and may require another pass over data. A range sample alone does not magically contain every later compressed quantity.

Using ℓ=k+p columns for target rank k supplies p oversampling directions. Independent standard Gaussian entries give rotational invariance, which helps control how the probes intersect the dominant right-singular subspace. For an exactly rank-r matrix and at least r Gaussian columns, the sampled range equals the true range with probability one in exact arithmetic. This is not an absolute every-input-probe guarantee: special deterministic probes can miss it, and floating-point rank decisions can lose weak directions. For approximately low-rank matrices, tail singular values govern the achievable residual.

Y=AΩ,QTQ=I,range⁡(Q)=range⁡(Y),B=QTA,A≈QB=QQTAY=A\Omega,\qquad Q^{\mathsf T}Q=I,\quad \operatorname{range}(Q)=\operatorname{range}(Y),\qquad B=Q^{\mathsf T}A,\quad A\approx QB=QQ^{\mathsf T}A
If Y is rank deficient, Q has only its independent columns. Orthogonalization must preserve those directions; Q is a range basis rather than a random matrix left unprocessed.↔ Scroll wide equations horizontally.

State what probability and norm a bound actually controls

A useful Gaussian theorem bounds the expected Frobenius residual of the range projection by a factor times the optimal rank-k Frobenius tail. Its assumptions include a fixed real matrix, target rank at least two, oversampling at least two, and enough ambient dimensions for all probe columns. The expectation is over the independent Gaussian probes. The projection can have rank as large as k+p, so this statement is not an error guarantee for every subsequently truncated rank-k output. Additional compression or truncation needs its own analysis.

Expectation and high-probability statements answer different questions. An expected error bound permits individual draws with larger error, whereas a tail bound quantifies how likely a specified excess is. Neither is automatically a measured certificate for one run. Independent test probes can provide probabilistic residual checks if their own assumptions are respected; reusing only the training probes can miss directions that the original sample failed to capture. A fully computed residual norm is stronger direct evidence but may defeat the intended storage or pass budget.

EΩ∥A−QQTA∥F≤(1+kp−1)1/2(∑j>kσj2)1/2,k≥2, p≥2, k+p≤min⁡(m,n)\mathbb E_\Omega\lVert A-QQ^{\mathsf T}A\rVert_F\le\left(1+\frac{k}{p-1}\right)^{1/2}\left(\sum_{j>k}\sigma_j^2\right)^{1/2},\qquad k\ge2,\ p\ge2,\ k+p\le\min(m,n)
For fixed real A and an n-by-(k+p) matrix of independent standard Gaussian entries, Q spans AΩ. This is an expectation bound for the range projection in exact arithmetic, not a per-draw deterministic guarantee.↔ Scroll wide equations horizontally.

Power steps improve separation but consume passes and numerical care

For a nonnegative integer q, a powered sample uses (AAᵀ) to the power q times AΩ. In exact singular coordinates this raises gains to the power 2q+1, increasing the separation between dominant and weak directions. Forming raw matrix powers is unnecessary and unsafe. Alternate matrix and transpose applications with intermediate orthonormalization to avoid losing weaker retained directions to rounding. Every application can require a data pass or substantial communication. More power iterations can improve approximation while making the procedure slower or impossible under a strict one-pass constraint.

Sketching is a broader idea than range finding. A left sketch can compress rows in a least-squares problem, but preserving all relevant residual norms requires an appropriate subspace-embedding guarantee, not merely a small sampled range error. Keep those tasks distinct. Record probe dimension, random seed for reproducibility, power count, orthogonalization strategy, and validation method. A reproducible seed does not prove accuracy, yet it makes a failure diagnosable. Compare total data movement and approximation quality against a deterministic alternative before claiming that randomization has improved the computation.

A concrete probe is not automatically optimal

For A=diag(4,1), use the illustrative deterministic probe ω=(1,1). Construct its one-dimensional range projection and compute spectral error.

  1. The sample is y=(4,1), so q=y/‖y‖=(4,1)/√17. The projection approximation is qqᵀA=[[64/17,4/17],[16/17,1/17]].

  2. An orthogonal unit vector is w=(−1,4)/√17. Since I−qqᵀ=wwᵀ, the residual equals w(wᵀA), whose only nonzero singular value is ‖wᵀA‖.

  3. Here wᵀA=(−4,4)/√17, so error is √(32/17)=4√(2/17)≈1.372. The optimal rank-one error is 1, showing that this sampled direction is useful but not exactly optimal.

The result

The projection error is about 1.372. This two-dimensional deterministic illustration does not satisfy the displayed Gaussian theorem's k≥2 and oversampling hypotheses, so its error was derived directly.

Explore the model

Interactive lab

Interactive lab · matrix

Predict how a probe favors the dominant output direction

Reset, set a=0.25 and b=0. For probe (1,1), predict output (0.25,1), closer to the second axis than the input. A conceptual powered sample AAᵀA applied to the same probe is (0.015625,1), even closer. Compare a fresh identity run using Reset, a=1, b=0, where there is no preferred singular direction. The instrument displays only A, not random sampling, a powered iterate, or a probability guarantee.

Predict how a probe favors the dominant output directionThe selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Current readings: Area scale · det A: 1.4; Singular values · σmax, σmin: 1.597, 0.876; Condition number · κ₂(A): 1.823. All parameters are adjustable with the labeled controls below.Matrix A with first row 1.4, 0.6 and second row zero, one; display interpolates between identity and A while final determinant remains 1.4.−4−2024−2−1012x · equal geometric scaleyA = [ 1.4 0.6 ; 0 1 ]Display blend: 0% · final values below
Interpolated geometryOriginal unit squareSelected final transform
Area scale · det A
1.4
Singular values · σmax, σmin
1.597, 0.876
Condition number · κ₂(A)
1.823
t = 0 s

The selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forSpectral separation helps matrix probes reveal a dominant range, but the actual algorithm must preserve and validate its sampled subspace.

Check your understanding

What does the displayed Gaussian expected-error bound establish?

Try it yourself

For A=diag(3,0), compare probes ω=(1,2) and ω=(0,1). Explain what they show about exact range capture and Gaussian probability-one statements.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Compute each sampled vector before attempting normalization; a zero sample cannot define a unit basis vector.

Compare with the solution

The first probe gives y=(3,0), so q=e₁ and qqᵀA=A exactly. The second gives y=0, so there is no nonzero sampled range and the rank-one action is missed entirely. These are deterministic probes. A continuously distributed Gaussian probe has a nonzero first coordinate with probability one, giving exact capture here in exact arithmetic, but the exceptional zero-coordinate case still exists as a mathematical input. Probability one is not a guarantee for every conceivable probe, and finite-precision tolerance can add further practical failures.

Take it with you

  • Random probes build a range basis, after which compression and factorization still require work.
  • Expectation, tail probability, and a particular run's validation are different accuracy statements.
  • Power steps and oversampling trade approximation quality against passes, storage, and numerical robustness.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.