mathematics//linear algebra//rank

The rank of a matrix is the dimension of its output, the number of independent directions that survive the transformation, and engineers use it to answer yes-or-no questions about a system: can every state be seen, can every state be reached, do these measurements pin down these parameters. Equivalently it is the number of linearly independent columns (or rows, which always gives the same count). A 3 × 3 matrix of rank 2 squashes space onto a plane: whatever went in, what comes out has only two degrees of freedom, and the third has gone into the null space. The two counts always add up to the number of columns, so every direction lost from the output is a direction the input can no longer be told apart along.


The rank of a matrix is the dimension of its output, the number of independent directions that survive the transformation, and engineers use it to answer yes-or-no questions about a system: can every state be seen, can every state be reached, do these measurements pin down these parameters. Equivalently it is the number of linearly independent columns (or rows, which always gives the same count). A 3 × 3 matrix of rank 2 squashes space onto a plane: whatever went in, what comes out has only two degrees of freedom, and the third has gone into the null space. The two counts always add up to the number of columns, so every direction lost from the output is a direction the input can no longer be told apart along.

Forty sensors on a compressor station make a data matrix with forty columns, yet mass and energy balances tie them together so tightly that a handful of directions carry nearly all the variation: the data have far lower rank than their width suggests, which is why PCA works so well on plant data. The same count decides the classic structural tests of control. A system is observable when its observability matrix has rank nnn, the number of states (observability matrix), and controllable when its controllability matrix does (controllability matrix). np.linalg.matrix_rank(control.obsv(A, C)) is the one-line check.

Rank is a yes or a no; real data need a how much.

A matrix whose smallest stretch is 10−1210^{-12}10−12 of its largest has full rank on paper and behaves as rank-deficient in any computation. The numerical rank, the number of singular values above a reasonable tolerance, is the one that matters with measurements.

Rank deficiency is rarely exact in practice and usually means near-dependence. A thrust model with columns ω2\omega^2ω2 and ω\omegaω, tested only between 6,000 and 7,000 rpm, has two columns that are almost proportional: full rank, tiny smallest singular value, and coefficients that come out huge and of opposite sign. The condition number measures how close to rank loss a matrix sits.

The tolerance is a modelling choice. NumPy's default scales with the largest singular value, the matrix size and machine precision, which suits rounding error; with noisy sensors the threshold should sit at the noise level, and the count of singular values above it is how many directions the data actually determine.

Rank says nothing about volume or about stability: the determinant gives the first (zero exactly when rank is lost, for a square matrix), the eigenvalues the second.