Different rank and nullity obtained from intuition and computation

linear algebralinear-transformationsmatricesmatrix-rank

I just started learning linear algebra in school. After watching 3Blue1Brown's Essence of Linear Algebra, and there's something I'm confused about.

\begin{pmatrix}
2&0\\
-1&1\\
-2&1\\
\end{pmatrix}

According to the rank-nullity theorem,
Rank + Nullity = Number of columns = $2$

Apparently, the $3$ x $2$ matrix can be interpreted as a linear transformation mapping a $2$D space to a $3$D space.
Since the number of dimensions of the output space is $3$, the rank of the matrix is $3$. But that would mean that the nullity of the matrix is $-1$? It doesn't make sense to have $-1$ basis vectors for the null space.

I tried to compute the rank of the matrix by finding its row echelon form, and apparently it's $2$? Which would make the nullity of the matrix $0$.

What's the rank and nullity of this matrix?

Best Answer

The rank of a matrix is the dimension of the span of its columns. Hence, the rank is less than or equal to the number of columns, i.e. the dimension of the input space.

Intuitively, this kind of makes sense. If I have a $3 \times 2$ matrix like in your example, then as you noted, it can be interpreted as a linear transformation from 2D space to 3D space, say $T: \mathbb{R}^2 \to \mathbb{R}^3$. Since our input space is 2-dimensional, you can think of it as having only "2 vectors" to work with (by which I mean 2 basis vectors, since a 2D space is generated by 2 linearly independent vectors). More precisely, if $v_1, v_2$ is a basis for our 2D space, then the image is going to be $$\text{image of $T$} = \{Tv: v \in \mathbb{R}^2 \} = \{ T(a_1v_1 + a_2v_2): a_1, a_2 \in \mathbb{R} \} = \{a_1T(v_1) + a_2 T(v_2): a_1, a_2 \in \mathbb{R} \} = \text{span of $\{T(v_1), T(v_2)\}$}.$$ Therefore, the image is spanned by two vectors, so certainly its dimension must be less than or equal to 2.

To answer your question: the rank is 2, hence the nullity is 0. In general, the rank and nullity can be found by row-reducing, but in this case, the example is simple enough: there are only two columns, and we can see that neither is in the span of the other, so they are linearly independent, i.e. the rank is 2.

Related Question