Vector spaces · Definition
Rank of a matrix
Before you start you need to know
The rank counts how many truly independent directions a matrix contains; it summarizes how much information the matrix carries and decides whether a system has a unique solution.
Definition
The rank of a matrix \(A\) is the dimension of the subspace spanned by its columns.
The span of the columns of \(A\) is called the column space, \(\operatorname{col}(A)\), and its dimension is the rank. To compute it, row reduce: the rank is the number of pivots. The pivot columns form a basis of the column space, and the non-pivot columns are combinations of them.
A remarkable fact is that row rank and column rank coincide: the number of independent rows equals the number of independent columns. Hence the rank of an \(m\times n\) matrix satisfies \(\operatorname{rank}(A)\le\min(m,n)\), and when it reaches that value the matrix is said to have full rank.
The rank governs linear systems. The system \(Ax=b\) has a solution exactly when \(b\) lies in the column space, that is, when appending \(b\) as a column does not raise the rank. If in addition the rank equals the number of unknowns the solution is unique; if it is smaller there are free variables and therefore infinitely many solutions.
Typical mistake: thinking the rank is the number of nonzero entries or nonzero rows of the original matrix. You must row reduce first: the matrix \(\begin{pmatrix}1&2\\2&4\end{pmatrix}\) has no zeros and no zero rows, yet its rank is 1. For a square \(n\times n\) matrix, rank \(n\) is equivalent to being invertible.
Think about it
A \(5\times 3\) matrix has rank 3. Can the system \(Ax=b\) have infinitely many solutions?
No: with rank 3 there is a pivot in every column, so there are no free variables. It has at most one solution.
If every row of \(A\) is a multiple of a single nonzero row, what is its rank?
1: there is only one independent row, and row rank equals column rank.
Exercises 10
- What is the rank of \(\begin{pmatrix}1&2\\2&4\end{pmatrix}\)?
- What is the rank of the identity matrix \(I_3\)?
- What is the largest possible rank of a \(3\times 5\) matrix?
- What is the rank of the \(2\times 2\) zero matrix?
- Compute the rank of \(\begin{pmatrix}1&2&3\\4&5&6\\7&8&9\end{pmatrix}\).
- Compute the rank of \(\begin{pmatrix}1&0&2\\0&1&3\\1&1&5\end{pmatrix}\).
- At most how many linearly independent rows does \(A=\begin{pmatrix}1&2&0&1\\0&0&1&3\\1&2&1&4\end{pmatrix}\) have?
- A \(4\times 4\) matrix \(A\) has rank 3. Which statement is true?
- Compute the rank of \(\begin{pmatrix}1&2&1\\2&4&3\\1&2&2\end{pmatrix}\).
- For which value of \(k\) does \(\begin{pmatrix}1&2\\3&k\end{pmatrix}\) have rank 1?
What comes next
References
- Gilbert Strang, Introduction to Linear Algebra, 6th edition, Wellesley-Cambridge Press, 2023. §3.2 y §3.4
- Sheldon Axler, Linear Algebra Done Right, 4th edition, Springer, 2024. §3.F
- David C. Lay, Steven R. Lay, Judi J. McDonald, Linear Algebra and Its Applications, 6th edition, Pearson, 2021. §2.9 y §4.6