Here's a sample question from "Advanced Engineering Mathematics",
The above question gave rise to the rest of what I would talk about in this article. It was an unassuming question, because at first glance I considered it simple, because there was nothing deeply intuitive to think about except finding two matrices that would be my counterexamples (alluding the "Show the following" part). But as I attempted the question, the rest of what became of this article surfaced, and I decided to jot it down.
Vectors as units of Matrices
Depending on your familiarity with Linear Algebra, this might be simply intuitive. Every row and column of a matrix can be observed as a vector, either as a row vector or column vector. You can grow a matrix row-wise by combining existing rows through linear combination, and conversely, same holds true for column-wise growth. Also, adding arbitrary vectors either ways is a viable growth approach as well, but for the article sake, I want to establish relationships across the rows/columns, hence I will stick with linear combination of rows and columns.
Row-wise growth
For a single row vector, . I can grow it into a matrix by creating a second row, , that is a linear combination of (for instance, multiplying it by 2):
Combining them row-wise yields:
Because the second row depends entirely on the first row, I grew the matrix vertically without adding new, independent directional information.
Column-wise growth
Now, I can apply the same logic horizontally using columns. Starting with a single column vector, . I can grow the matrix by creating a second column, , through a linear combination (for instance, multiplying it by 2):
Combining them column-wise yields:
By placing the dependent vector to the right of my original column, the matrix grows horizontally while maintaining a strict linear relationship between its columns.
What is the Rank of a Matrix?
Keep in mind how I grew the matrix to add more rows or columns. In a sense, I did not add any new information that isn't known already. You can think of rank as the "score" of unique, independent information contained within a matrix.
In the row-wise growth example, I started with one row and generated a second row by multiplying the first by 2. The second row () brings no new information to the table, because it is basically a multiple of a unit vector (which can be simplified back to ). Therefore, the rank of this matrix is 1.
The exact same logic applies to the column-wise growth example. I doubled one column to make the second, looking at the matrix horizontally, is just a shadow of . There is only 1 independent column of data.
A beautiful fact of linear algebra is that the number of independent rows always equals the number of independent columns.
If a matrix has a size of but a rank of , it means the matrix grew in size, but it failed to grow in unique information.
What a Matrix does to a Vector
Earlier, I multiplied a vector by a scalar value to form new rows and columns of a matrix. What about when I multiply a by a , to get a new ? The matrix transforms the input vector into an output vector. Do we have an observable relationship? From here henceforth I will focus on the columns. Let's use (where ):
The went in, and the came out. If I was to add the output (call it ) to the matrix, growing it into:
Looking at the matrix-vector multiplication, (without prior knowledge, one could imagine that I scaled by 5 to get ). Hence, matrix-vector multiplication is also a linear combination of the columns of a matrix.
Whichever linear combination I chose, be it scalar value or a matrix-vector multiplication, there's an observable linear relationship. The columns are all scalar multiples (linear combinations) of . Geometrically speaking, this is a line through the origin in ℝ², in the direction of .
Now, what if I try the below input:
The went in, and zero came out. The matrix completely annihilated that input, erasing all information. Same goes for :
Also erased, and same goes for , you can try it yourself. All three of these are scalar multiples of . Every vector along that direction gets annihilated by .
The values might look arbitrarily chosen, but they are not. What values of would you substitute into to make the equality true? Solve :
Both equations say the same thing: , meaning is free. Let , then:
Also, why does this matter one might ask? This means this sample matrix has a blind spot. There's an entire line of input vectors that cannot distinguish from the zero vector. If I handed you the output , you can't tell whether the original input was or or or any other multiple of . Information along that direction was permanently destroyed by the multiplication.
So there is a relationship between information preserved and information destroyed. Let me use the identity matrix (a matrix with rank 2) to show you the contrast.
Both columns and are independent and their possible linear combinations produces every vector in ℝ².
Solving :
This gives . The only vector that sends to zero is the zero vector itself. That makes sense because the identity matrix doesn't destroy any information.
The pattern is clear. The rank-1 matrix had an entire line of inputs it annihilated. The rank-2 matrix annihilated nothing except the zero vector. The higher the rank, the less the matrix destroys.
Let me push this into three dimensions for a different perspective. Here is a matrix with rank 2:
Row reduce gives , hence . The columns are and and are equally independent of each other. Both columns live in ℝ³ (3 components per column). Geometrically they form a plane through the origin in ℝ³, but not all of ℝ³ (just a flat 2-dimensional slice of it). For instance, the vector is reachable (), but the vector is not (you'd need , from the first two components, but then the third component would be 0, not 1).
Then solving :
From the first two equations, . The blind spot is only the zero vector, meaning no information is lost. Again, the higher the rank, the less information is lost.
What a Matrix does to a Matrix
I showed that matrix-vector multiplication is a linear combination of 's columns. Matrix-matrix multiplication is the same thing, just repeated. Each column of the second matrix acts as a separate input vector, and transforms each one independently.
I will reuse the rank-1 matrix and multiply it by itself:
The first column of is times the first column of :
The second column of is times the second column of :
So:
Both output columns, and , are scalar multiples of . The same line, the same direction, and the outputs of land on the exact same line as the outputs of .
What happened from the row perspective? Each row of is a linear combination of the rows of the second matrix. But for understanding what the matrix preserves and what it destroys, the column perspective is where the geometry lives. So I'll keep my focus there.
The observation here is that when I square a matrix, I am feeding the outputs of back into as inputs. The question becomes, what does do to vectors that it already produced? Does it preserve them, or does it destroy them? The answer depends on where those output vectors land relative to what the matrix annihilates.
Column Space and Null Space
By now, I have been pointing at two collections of vectors without formally naming them. Allow me to fix that.
The collection of all possible output vectors that a matrix can produce is called its column space. For our rank-1 matrix , every output is a scalar multiple of . The column space is that entire line through the origin. It is the set of all reachable destinations. Any vector in ℝ² that does not sit on this line is unreachable by . No input exists that would produce it.
The collection of all input vectors that annihilates (maps to zero) is called its null space. For the same matrix, every multiple of gets erased. The null space is that entire line through the origin. It is the set of all blind spots. Any input along this direction is invisible to the matrix.
Both of these collections are vector spaces (closed under linear combination), not just arbitrary sets. If erases and erases , then erases any combination , because .
The rank of a matrix is the dimension of its column space. It tells you how many independent directions the matrix can produce. The nullity of a matrix is the dimension of its null space. It tells you how many independent directions the matrix destroys. And the two always add up to the number of columns:
For our rank-1 matrix in ℝ², the column space is 1-dimensional (one line of outputs), the null space is 1-dimensional (one line of erased inputs), and columns.
For the identity matrix, the column space is 2-dimensional (all of ℝ²), the null space is 0-dimensional (only the zero vector), and columns.
Hopefully it is clearer now when I say "a matrix with more rank preserves more and destroys less, while a matrix with less rank preserves less and destroys more".
Now let me get back to the original question.
Let's solve the question
Take two matrices, both with rank 1. Say , and for :
. One independent row, one zero row (which adds no new information). Let's compute :
. Squaring did nothing as .
For :
. One independent row, one zero row. Compute :
. Squaring removed all information inside the matrix, resulting into a zero matrix.
These two matrices give the counterexample:
, but .
But why did squaring preserve 's rank while destroying 's entirely? This is where the column space and null space make the answer visible.
Why it happened
For matrix , the column space is (that is the -axis), and the null space is (which is the -axis). These two lines are completely separate, and they share nothing except the zero vector.
When I square , I feed 's output back into . The output lives on the -axis (the column space), but the -axis is not the null space. does not annihilate vectors on the -axis. So the output survives the second application, hence information is preserved. .
For matrix , the column space is (also the -axis), but the null space is also (which is also the -axis). They are the same line.
When I square , I feed 's output back into . The output lives on the -axis (the column space). But the -axis is also the null space, hence annihilates every vector on that line. So the output of the first application gets completely erased by the second application. .
Same rank, same column space dimension, same null space dimension, but the geometric relationship between the two spaces is entirely different. In , the column space and null space point in different directions. In , they point in the same direction. That one difference determines whether squaring preserves or destroys.
Observation
Two matrices can agree on every numerical summary. Same rank, same nullity, same dimensions for every space involved. And yet they behave completely differently under the same operation, because those numbers alone do not capture the geometric configuration of the spaces relative to each other.
Rank tells you "how much" a matrix preserves, but it does not tell you "where" the preserved information lands relative to what the matrix destroys. That "where" is the relationship between the column space and the null space. When the column space avoids the null space, information survives repeated application. When the column space falls inside the null space, information self-destructs on contact.
A simple question about counterexamples opened up into the geometric structure underneath matrix multiplication. The answer to "give a counterexample" was two lines of computation, but the answer to "why does this counterexample work" required me pausing and observing intuitively what a matrix preserves, what it destroys, and how those two collections of vectors sit relative to each other in space.