**Approach (brief)** Use randomized range finding to compute Q≈range(A) then project A to low-dim B = Q^T A and compute SVD(B). This yields approximate rank-k SVD A ≈ Q (U_B Σ V^T).**Pseudocode**python
# Sketching: draw Omega and form Y = A @ Omega
Omega = randn(n, k+p) # p = oversampling
Y = A @ Omega
# Orthonormalization: QR
Q, _ = qr(Y, mode='reduced') # e.g. stable Householder/TSQR
# (optional) Power iterations to amplify spectrum
for i in range(q):
Y = A.T @ Q
Q, _ = qr(Y, mode='reduced')
Y = A @ Q
Q, _ = qr(Y, mode='reduced')
# Projection and SVD
B = Q.T @ A
U_tilde, S, Vt = svd(B, full_matrices=False)
U = Q @ U_tilde
return U[:, :k], S[:k], Vt[:k, :]
**Probabilistic error bounds** With p ≥ 4 and q power iterations, with high probabilitytext
||A - Q Q^T A||_2 ≤ (1 + 9 * sqrt((k+p)/p))^(1/(2q+1)) * σ_{k+1}
Intuition: error is proportional to the (k+1)-th singular value; power iterations reduce the multiplier exponentially in q.**Complexity & memory** - Time: O(m n (k+p) + (k+p)^2 (m+n)) dominated by sketching (one pass O(mn(k+p)/n?) actually O(m n (k+p))/?) — practically O(m n (k+p)) for dense A. Each power iteration adds two additional passes. - Memory: O((m+n)(k+p)) for Q, Omega, B.**Implementation notes (researcher focus)** - Use stable QR (Householder or TSQR for distributed). Re-orthogonalize in power iterations to avoid loss of orthogonality. - Centering / scaling if needed. Use double precision; for very ill-conditioned matrices, increase q. - Choose p ≈ 5–20; larger p improves success probability and accuracy. For spectral-norm guarantees p=10 is common. - For sparse or fast operators, use structured/randomized transforms (SRFT, CountSketch) to reduce cost. - Validate with residual ||A - U S V^T||_F or ||·||_2 estimated via a few power iterations.