Rank of Sum & Product Bounds
Chapter 4: QR Decomposition and Numerical Rank — Rank of Sum & Product Bounds
From the book
Chapter 4: QR Decomposition and Numerical Rank. In the chapter mind map this icon labels Rank of Sum & Product Bounds. The discussion below is excerpted and lightly edited from § Theorem: Rank of Sum and Product in Mathematics for AI and Machine Learning.
For $A,B \in \mathbb{R}^{M \times N}$, and for $A \in \mathbb{R}^{M \times d}$, $B \in \mathbb{R}^{d \times N}$, respectively,
The product bound was proved in the matrix chapter; the sum bound has an equally short reason. Every column of $A+B$ is a column of $A$ plus a column of $B$, so the column space of $A+B$ lies in the span of the two column spaces, whose dimension is at most $\mathrm{rank}(A) + \mathrm{rank}(B)$. For a LoRA update, whose rank is at most $r$ (equation the referenced section), the sum bound gives $\mathrm{rank}(W_0 + \Delta W) \le \mathrm{rank}(W_0) + r$. Both bounds can be strict: $B = -A$ gives $A + B = 0$. They also have matching lower bounds:
|\mathrm{rank}(A) - \mathrm{rank}(B)| \le \mathrm{rank}(A+B), \qquad \mathrm{rank}(A) + \mathrm{rank}(B) - d \le \mathrm{rank}(AB).
The first follows from the sum bound applied to $A = (A+B) + (-B)$; the second, Sylvester's rank inequality, holds because $AB$ can null at most $d - \mathrm{rank}(A)$ more dimensions than $B$ does. So $\mathrm{rank}(W_0) - r \le \mathrm{rank}(W_0 + \Delta W) \le \mathrm{rank}(W_0) + r$: a rank-$r$ update moves the rank by at most $r$.
What this drawing shows
What you see. Rank of a product: `AB = A @ B` through a narrow inner dimension, so.
In the mind map. Chapter 4 — Rank of Sum & Product Bounds. See From the book above for definitions, figures, and worked examples.
Where to read next
Read the full definitions, figures, and worked examples in Chapter 4: QR Decomposition and Numerical Rank — see the mind-map node Rank of Sum & Product Bounds.