Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Assess a matrix's rank and conditioning from its singular values

Use when: you have A's singular values (or its SVD) and need its rank, how trustworthy that rank is numerically, or how sensitive A\mathbf x=\mathbf b is to input error

Goal: the exact rank, the numerical rank at a chosen tolerance, and the condition number \kappa(A), with what each one means for solving with A

Taught in Rank, numerical rank, and the condition number

  1. 1

    Write \sigma_1\ge\cdots\ge\sigma_n from the SVD; the exact rank is how many of them are strictly greater than zero, no matter how small.

    Example

    A has singular values 5, 0.05, 0.005 from largest to smallest; none is exactly zero, so the exact rank is 3.

    Why: exact rank is a strict positive-or-zero test on each singular value, the same test the SVD's own rank factorization already relies on.

  2. 2

    Choose a threshold \epsilon suited to the data's own precision, then count how many singular values exceed \epsilon; that count is the numerical rank.

    Example

    With \epsilon=0.01: 5>0.01 and 0.05>0.01 both count, while 0.005<0.01 does not, giving numerical rank 2.

    • a singular value sits comfortably above \epsilon — count it as genuine structure.
    • a singular value sits at or below \epsilon — drop it, treating it as rounding noise rather than real structure.

    Why: numerical rank is what a computation should actually trust as real structure once floating-point noise is accounted for.

  3. 3

    Divide the largest singular value by the smallest one that is still strictly nonzero: \kappa(A)=\sigma_1/\sigma_r, using the exact rank's own r, not the numerical-rank cutoff.

    Example

    \kappa(A)=5/0.005=1000.

    • A has no exactly-zero singular value — \kappa(A) is a genuine finite number.
    • A has at least one exactly-zero singular value — \kappa(A) is treated as infinite, signaling A is not invertible at all.

    Why: this measures the true worst-case sensitivity built into A itself, independent of whatever tolerance the numerical-rank calculation happened to use.

  4. 4

    Multiply \kappa(A) by the relative error already present in \mathbf b to get the worst-case relative error that could appear in the solution \mathbf x.

    Example

    If \mathbf b carries a 0.1\% relative error, the bound is 1000\times0.001=1, meaning the solution's error could be as large as the solution itself.

    Why: this bound is what makes a large condition number a genuine numerical hazard, warning that a tiny input error can swallow the whole answer.

Common mistakes

  • Confusing numerical rank's tolerance-dependent count with exact rank's strict positive-or-zero test.
  • Computing \kappa(A) using the numerical rank's smallest surviving singular value instead of the true smallest nonzero one.
  • Treating a large \kappa(A) as impossible just because A is technically invertible; the two facts are unrelated.
  • Picking a tolerance \epsilon with no connection to the data's own measurement precision.