# Conceptual question on dimension theorem


$A = [1, 0, -1]$. $N(A) = [k, j, k]^T$ where k and j are any integer. I suppose I don't understand the dimension theorem holds up here. Is $\rank(A)$ equal to 1 (because of 1 row), or 3, because of 3 columns? A similar question for $N(A)$. Regardless, the sum of $\rank(A)$ and $\nullity(A)$ will not equal n in this case, so how exactly does the dimension's theorem hold up?

Furthermore, I wonder about a general case. Let's say you have a 4 x 4 matrix, and the null space is 4 dimensional. What exactly does that mean? I understand it to be that the null space has rank 4, so $\nullity(A)$ = 4, so by the dimension's theorem, $\rank(A)$ must be 0 right i.e. the zero matrix? I suppose I just don't see how it all intuitively fits together.

-

The rank of $A$ is the dimension of the space spanned by the rows, which is equal to the dimension of the space spanned by the columns. It is not necessarily equal to the number of columns or to the number of rows. The three columns of $A$ span a 1-dimensional subspace of $\mathbb{R}$, and the rows span a 1-dimensional subspace of $\mathbb{R}^3$; so the rank of $A$ is $1$. Here, $n=3$, and the nullity has dimension $2$ (a basis is given by $(1,0,1)^T$ and $(0,1,0)^T$). The conclusion of the Dimension Theorem does work out, since $1+2 = 3$. (Remember that when you say the matrix is $m\times n$, $m$ is the number of rows, $n$ is the number of columns; so your $A$ is $1\times 3$).

If you have a $4\times 4$ matrix and its nullity is $4$, that means that every vector of $\mathbb{R}^4$ is sent to $\mathbf{0}$. The only way for that to happen is if every entry of your matrix is $0$ which means the rank is $0$. Note that $A(1,0,0,0)^T$ is the first column of $A$; $A(0,1,0,0)^T$ the second, $A(0,0,1,0)^T$ the third column; $A(0,0,0,1)^T$ the fourth column; if all of them are $\mathbf{0}$, as must be the case if the nullity of $A$ is $4$, then every column of $A$ is $\mathbf{0}$, so $A$ is the zero matrix.

Intuitively: think about $A$ as the coefficient matrix of a system of linear equations. Then the nullity is the number of free variables in the solution set, and the Dimension Theorem tells you that the rank is equal to the number of leading variables.

The reason is that the rank, viewed as the dimension of the rowspace, is the number of "independent equations" in your system. If you have $r$ independent equations in $n$ unknowns, then you expect the number of free variables to be $n-r$ (each equation gives one constraint). But $r$ is the rank, so the nullity plus the rank is $n$, the number of variables.

-
Thank you very much! This is a really clear explanation, and I understand much better. Coincidentally, is there a fast way to calculate the null space of a matrix, or do we have to solve Ax =0 for a basis? –  John Doe Dec 12 '11 at 5:10
Finding a basis for the nullspace is equivalent to solving $Ax=0$; if you do one, you are doing the other. –  Arturo Magidin Dec 12 '11 at 5:11
Yes, but you gave $(1, 0, 1)^T and (0, 1, 0)^T$ as a matter of fact, so I thought that perhaps there was a quicker way to solve the problem. I suppose you could tell what the basis was just by observation then? –  John Doe Dec 12 '11 at 5:14
Set each of the free variables to $1$ and the rest to $0$ one at a time to get a basis. From $(k,j,k)^T$, first, $k=1$ and $j=0$ gives you $(1,0,1)^T$; then $k=0$ and $j=1$ gives you $(0,1,0)^T$. –  Arturo Magidin Dec 12 '11 at 5:16
Yes, that does give the specific basis, but first you would have to derive that the nullspace is of the form $(k,j,k)^T$, and to do that you would have to solve Ax = 0 to get the general form right? –  John Doe Dec 12 '11 at 5:20