Curso de Álgebra Lineal: Fundamentos y Aplicaciones

Rank and Nullity Explained With One Theorem

Curso de Álgebra Lineal: Fundamentos y Aplicaciones

Contenido del curso

Sistemas de Ecuaciones Lineales

Rank and Nullity Explained With One Theorem

Resumen

The rank of a matrix tells you the true dimension of the information it carries. It is the number of pivots you find after Gaussian elimination, and also the number of dimensions that survive a linear transformation. If you work with data, machine learning, or systems of equations, understanding rank is how you spot redundancy and predict whether a solution exists.

What does the rank of a matrix actually mean?

There are two definitions, and both point to the same idea. The computational one says the rank is the number of pivots left after applying Gaussian elimination. The geometric one, which is the more revealing, says the rank is the number of dimensions of the column space, that is, the universe of possible outputs of the transformation AX.

Think of a 3x3 matrix acting on three dimensional space:

  • If the output stays as the full 3D space, the rank is 3.
  • If the output collapses into a plane, the rank is 2.
  • If everything gets squeezed into a single line, the rank is 1.

The rank counts how many dimensions survive the transformation, and that single number changes how you read the entire matrix.

What is the rank of a matrix in simple terms? It is the number of independent directions a matrix preserves after transforming a space. Computationally, it equals the number of pivots after Gaussian elimination.

How are rank and nullity connected through the rank nullity theorem?

What happens to the dimensions that do not survive? They get crushed to the origin and form the null space. The dimension of that null space has its own name: the nullity.

The rank nullity theorem ties both ideas together with a clean equation:

rank(A) + nullity(A) = number of columns of A

This is essentially a conservation law for dimensionality. Every dimension of your input space ends up in one of two groups after the transformation: it either survives and joins the column space, or it collapses and joins the null space. No dimension disappears mysteriously, it transforms or it cancels.

How do you calculate rank and nullity with an example?

Take the matrix A with rows (1, 2, 3), (1, 1, 2), and (2, 3, 5). To find its rank, run Gaussian elimination directly on it. You do not need an augmented matrix here because there is no vector b, the process is the same minus that step.

When you finish, you will see one pivot in the first row, another pivot (a -1) in the second row, and the third row turns entirely into zeros. That zero row is not random: the original third row was the sum of the first two (1+1=2, 2+1=3, 3+2=5). It was a redundant row that did not add new information.

So the rank is 2. Now apply the theorem to find the nullity:

  • nullity(A) = columns(A) − rank(A)
  • nullity(A) = 3 − 2 = 1

The matrix takes a 3D space and flattens it into a 2D plane, and a full line of vectors gets sent to the origin. That line is the null space.

Why does linear dependence reveal hidden redundancy in your data?

A zero row after elimination is more than a curiosity. It is explicit linear dependence: that row was a combination of the others, so it carried no new information. The same logic applies to columns. With rank 2, only two columns of the original matrix are linearly independent, and the third is a combination of the first two.

This matters far beyond the classroom.

  • In machine learning, a matrix with rank lower than its number of columns signals redundant features. If you have 100 features but the rank is 50, half of them can be expressed as combinations of the others, so you can drop them and reduce dimensionality without losing information.
  • In systems of equations of the form AX = B, the rank tells you about existence and uniqueness of solutions. If the rank is smaller than the number of unknowns, you can end up with infinite solutions or no solution at all.
  • In geometry, the rank tells you whether your vectors span the full space or only a flatter subspace inside it.

What does it mean when a column is linearly dependent? It means that column can be written as a combination of the others, so it does not add a new direction or dimension to the space generated by the matrix.

How do you visualize a redundant column geometrically?

Picture two matrices side by side. On the left, the matrix from our example: three column vectors in 3D, but the third (the yellow one) is literally the sum of the other two. The transformation builds a plane inside a 3D space, not a full volume. On the right, the standard basis in 3D, where each vector points in a completely new direction and all three are linearly independent. Same number of columns, very different rank.

Your turn: if you have a 4x5 matrix with rank 3, what is its nullity? Use the rank nullity theorem and share your answer in the comments.