Contenido del curso

Rank and Nullity in Linear Transformations

Resumen

The rank of a matrix tells you the true dimension of the information it contains. If you've already worked with Gaussian elimination, you've been calculating the rank without knowing it: it's simply the number of pivots that survive the process, and it reveals how much your matrix actually transforms space.

What does the rank of a matrix mean?

The rank has two definitions that point to the same idea. The computational one says it's the number of pivots you find after applying Gaussian elimination. The geometric one, which is the most powerful, says it's the number of dimensions of the column space, that is, the universe of possible results of the transformation AX.

Think of it this way: if a 3x3 matrix transforms three dimensional space into a plane, the dimension of its column space is two, so its rank is two. If it crushes everything into a line, the rank is one. And if nothing collapses, the rank stays at three.

What is the rank of a matrix? It's the number of dimensions that survive after the linear transformation. You calculate it by counting the pivots after Gaussian elimination.

What is nullity and how does it relate to rank?

The dimensions that don't survive get crushed to the origin and form the null space. The dimension of that null space is called the nullity. Both concepts are tied together by the rank-nullity theorem:

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

This is a conservation law for dimensionality. The total dimensions of your input space split into two groups after the transformation:

  • The dimensions that survive and form the column space, which is the rank.
  • The dimensions that collapse into the origin and form the null space, which is the nullity.

No dimension gets lost along the way. It either transforms or it gets annulled.

How do you calculate the rank with Gaussian elimination?

Let's apply this with the matrix A = [[1, 2, 3], [1, 1, 2], [2, 3, 5]]. Since there's no vector B here, you don't need an augmented matrix, but the elimination process is identical to what you already know.

After running Gaussian elimination, you count the leading non zero elements of each row. In this case, the first row starts with a 1, the second with a -1, and the third row is all zeros. That third row vanished because it was the sum of the first two: 1+1=2, 2+1=3, 3+2=5. It was a redundant row that didn't add anything new to the space.

So the rank of A is 2, meaning this matrix transforms three dimensional space into a two dimensional plane.

How do you apply the rank-nullity theorem?

With the rank in hand, you can solve for the nullity by rearranging the theorem:

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

Replacing the values: nullity = 3 − 2 = 1. That tells you a full line of vectors got transformed into the origin. The rank of 2 confirms the matrix flattens 3D space into a plane, and the nullity of 1 confirms exactly one dimension was annulled in the process.

What does it mean if the rank is less than the number of columns? It means there's a linear dependency: at least one column or row can be built as a combination of the others, so it adds no new direction to the space.

Why does the rank matter in real applications?

The rank isn't just a number, it's a diagnostic tool. The fact that the third row in the example became all zeros means it was a linear combination of the other two, so it added no new information. The same logic applies to columns: with rank 2, only two columns are linearly independent, and the third is redundant.

This idea shows up across multiple fields:

  • In machine learning, a matrix whose rank is lower than its number of columns signals redundancy in your data. If you have 100 features but the rank is 50, half of those features can be expressed as combinations of the others, which lets you cut dimensionality in half.
  • In linear systems of the form AX = B, the rank tells you about the existence and uniqueness of solutions. If the rank is smaller than the number of unknowns, you may end up with infinite solutions or none at all.
  • In data analysis, identifying low rank structures helps you compress information without losing meaning.

Visually, this is what's happening: in the example matrix, one of the three column vectors lies on the plane formed by the other two, so the transformation generates a flat plane embedded in 3D space. Compare that to the standard basis in 3D, where each vector points in a completely new direction and all three are linearly independent.

How can you practice this with a 4x5 matrix?

Here's the challenge: imagine a matrix with dimensions 4x5 and a rank of 3. What's its nullity? Use the rank-nullity theorem to figure it out and drop your answer in the comments. The next class digs into why some systems have one solution, some have infinite, and some have none.