Worked example
a: 1 2 2 4
R₂ = 2R₁ ⇒ R₂ − 2R₁ = [0, 0] R₁ = [1, 2] ≠ [0, 0]
→ rank(A) = 1
Method and scope
Rank counts independent pivot columns after row scaling and elimination. Zero matrices have rank zero. Tolerance is ε×32×max(rows,columns) on scaled rows; numerical rank near dependence can change with rounding.
0 ≤ rank(A) ≤ min(m,n)