- Home
- Articles
- Vectors & Linear Algebra
- Rank of a matrix
// Article · Linear algebra
What Is the Rank of a Matrix? How to Find It and What It Tells You About a Linear System
The rank is a single number that tells you how many rows of a matrix carry genuinely new information. Once you know it, you know immediately whether a system of equations has one solution, infinitely many, or none, without solving it to the end. This article explains the meaning, two ways to compute it, and where it is used in practice.
- Rank = number of linearly independent rows (or columns) = number of pivots after row reduction to echelon form
- Two methods: row-reduce and count the non-zero rows, or find the largest non-zero minor (sub-determinant)
- : no solution · equal : unique · equal : infinitely many
Rank counts non-redundant information
Look at the system . The third equation is exactly the sum of the first two, so it adds nothing new. The system has three equations but only two pieces of real information. That number, 2, is the rank of the coefficient matrix.
There is also a geometric picture. Each column of the matrix is a vector, and the rank is the number of independent directions those vectors span. If they all lie on one line the rank is 1; if they all lie in one plane the rank is 2.
A fact that looks surprising but is always true: the number of independent rows equals the number of independent columns. The rank therefore can exceed neither the number of rows nor the number of columns: .
Method 1: row-reduce and count
Elementary row operations (swapping rows, scaling a row, adding a multiple of another row) do not change the rank, so reduce the matrix to row echelon form and count the non-zero rows.
Two non-zero rows, so
This works for every size, including non-square matrices. Type your own matrix into the step-by-step rank lab (in Thai), which shows every step with exact fractions.
Method 2: minors (sub-determinants)
The rank is the order of the largest non-zero minor. For a square matrix this gives a short rule: .
In the classic example the determinant is , so the rank is below 3, but the top-left minor , so the rank is 2.
What rank tells you about a system of equations
This is the main reason to learn rank. Compare the rank of the coefficient matrix with that of the augmented matrix (the Rouché–Capelli theorem):
The system
Row-reduce the augmented matrix until the last row is
: both ranks are 3, unique solution · : a zero row, ranks 2 = 2, infinitely many · : ranks 2 and 3, no solution
In the infinite case with free variable
Rank problems with a parameter k
Exams love “find the rank of for every value of ”. Compute and factor it; values of that keep give full rank, and each value that makes must be substituted and row-reduced to find the actual rank. For example
gives rank 3 for , rank 1 for (all rows equal) and rank 2 for . Slide yourself in the rank-versus-k lab (in Thai).
Rank in engineering
- Circuits: the incidence matrix of an -node circuit always has rank , so there are independent KCL equations and independent KVL equations (the number of meshes) — the reason nodal analysis picks one reference node.
- Control systems: a system is controllable exactly when has full rank (Kalman's test).
- Measured data: real data contain errors, so the numerical rank from the singular values (SVD) counts only the values above the noise level.
Continue in the library (in Thai)
Frequently asked questions
What is the rank of a matrix in simple terms?
It is the number of linearly independent rows of the matrix, which always equals the number of independent columns. After row reduction to echelon form it is simply the number of non-zero rows (the number of pivots). For a system of equations it counts the equations that are not redundant.
What is the largest possible rank of a 3×4 matrix?
3, because the rank can exceed neither the number of rows nor the number of columns: rank A ≤ min(m, n). A 3×4 matrix can have rank 0, 1, 2 or 3.
Does det A = 0 mean the rank is n − 1?
Not necessarily. det A = 0 only says the rank is less than n; it may be n − 1 or smaller. The 3×3 matrix of all ones has det = 0 and rank 1. Row-reduce to find the actual rank.
How does rank decide whether a system has solutions?
Compare rank A with rank [A|b]. If rank A is smaller, there is no solution. If they are equal and equal the number of unknowns, the solution is unique. If they are equal but smaller than the number of unknowns, there are infinitely many solutions with (unknowns − rank) free variables.