# The rank of a linear transformation/matrix

I'm terribly confused on the concept of "rank of a linear transformation". My book keeps using it, but it doesn't clarify what it means (or at least I haven't been able to find it). Is it the same as the rank of the matrix? For example, if A is a mxn matrix, what would be the rank(A)?

-
Ok, so I did some extra reading. Correct me if I'm wrong on the following: the rank of a mxn matrix is the maximum number of linearly independent rows, the nullity is the number of columns with no leading coefficients. Together, added, they equal to the dimension of the matrix? However, does nullity+rank actually equal the dim of the matrix which is mn? – Nico Bellic Apr 15 '12 at 4:33
$\mathrm{rank}(A)$ is the dimension of the space spanned by the columns (the "columnspace") which is the same as the dimension of the space spanned by the rows (the "rowspace"), which is the same as the number of nonzero rows in the row echelon form of the matrix $A$, which is the same as the dimension of the image of the matrix, viewed as a linear transformation. – Arturo Magidin Apr 15 '12 at 4:34
The rank plus the nullity equals the number of columns (not "the dimension of the matrix"). This is the content of the Rank-Nullity Theorem. – Arturo Magidin Apr 15 '12 at 4:35
What do you mean by "the dimension of the image of the matrix, viewed as a linear transformation"? – Nico Bellic Apr 15 '12 at 4:43
Also, what does mn equal to then? – Nico Bellic Apr 15 '12 at 4:43

First: linear transformation vs. matrix.

Matrices.

A matrix is a rectangular array, in the context of linear algebra the entries are always elements of the ground field (in your case, probably either the real numbers or the complex numbers). An $n\times m$ matrix has $n$ rows and $m$ columns.

If $A$ is an $n\times m$ matrix, the rank of $A$ is the dimension of the row-space (the subspace of $\mathbb{R}^m$, viewed as made up of row vectors, spanned by the rows), which equals the dimension of the column-space (the subspace of $\mathbb{R}^n$, viewed as being made up of column vectors, spanned by the columns).

The rank also equals the number of nonzero rows in the row echelon (or reduced row echelon) form of $A$, which is the same as the number of rows with leading $1$s in the reduced row echelon form, which is the same as the number of columns with leading $1$s in the reduced row echelon form.

The nullity of the matrix is the dimension of the subspace of $\mathbb{R}^m$ (viewed as column vectors) of all vectors $\mathbf{x}$ such that $A\mathbf{x}=\mathbf{0}$. This is equal to the number of parameters/degrees of freedom in the general solution to $A\mathbf{x}=\mathbf{0}$, and is equal to the number of columns that do not have leading $1$s in the reduced row-echelon form of $A$.

In particular, since every column in the reduced row echelon form of $A$ either has a leading $1$ or does not have a leading one, we conclude that $$\mathrm{rank}(A) + \mathrm{nullity}(A) = \text{number of columns of }A = m.$$

This is sometimes referred to as the Rank-Nullity Theorem in its matrix version.

Linear transformations.

Given two vector spaces $V$ and $W$ (over the same field), a linear transformation is a map $T\colon V\to W$ such that $T(\alpha\mathbf{v}+\mathbf{v}') = \alpha T(\mathbf{v})+T(\mathbf{v}')$ for all $\mathbf{v},\mathbf{v}'\in V$ and all scalars $\alpha$.

The image of $T$ is the subspace of $W$ given by $\{T(\mathbf{v})\mid \mathbf{v}\in V\}$. The kernel of $T$ is the subspace of $V$ $\{\mathbf{v}\in V\mid T(\mathbf{v}) = \mathbf{0}\}$. The rank of $T$ is the dimension of the image of $T$, $\mathrm{rank}(T) = \dim(\mathrm{Im}(T))$. The nullity of $T$ is the dimension of the kernel of $T$, $\mathrm{nullity}(T) = \dim(\mathrm{ker}(T))$. The Rank-Nullity Theorem in its version for linear transformations states that $$\mathrm{rank}(T) + \mathrm{nullity}(T) = \dim(V).$$

Connection between the two.

An $n\times m$ matrix $A$ can be used to define a linear transformation $L_A\colon\mathbb{R}^m\to\mathbb{R}^n$ given by $L_A(\mathbf{v}) = A\mathbf{v}$. If we do this, the kernel of $L_A$ equals the nullspace of $A$, and the image of $L_A$ equals the column-space of $A$. In particular, $\mathrm{rank}(A) = \mathrm{rank}(L_A)$, $\mathrm{nullity}(A)=\mathrm{nullity}(L_A)$.

Going the other way, given a linear transformation $T\colon V\to W$, if we pick a basis $\alpha$ for $V$ and a basis $\beta$ for $W$, then we can define a matrix called the coordinate matrix of $T$ with respect to $\alpha$ and $\beta$, $[T]_{\alpha}^{\beta}$, which is a $\dim(W)\times\dim(V)$ matrix whose columns are the coordinate vectors, relative to $\beta$, of the images under $T$ of the vectors in $\alpha$. The matrix has the property that for every $\mathbf{v}\in V$, $$[T]_{\alpha}^{\beta}[\mathbf{v}]_{\alpha} = [T(\mathbf{v})]_{\beta}$$ where $[\mathbf{v}]_{\alpha}$ is the coordinate vector of $\mathbf{v}$ with respect to the basis $\alpha$, and $[T(\mathbf{v})]_{\beta}$ is the coordinate vector of $T(\mathbf{v})$ with respect to $\beta$. If we do this, then the rank of $T$ equals the rank of $[T]_{\alpha}^{\beta}$, and the nullity of $T$ equals the nullity of $[T]_{\alpha}^{\beta}$.

So the notions of rank and nullity for matrices and for linear transformations correspond to one another under the correspondence between matrices and linear transformations.

-
Again, thanks so much. For some reason the mn thing was throwing me off a great deal (I had read it somewhere online and for the life of me couldn't find what it meant). But apparently it has nothing to do with the rank-nullity theorem, so I believe it's all good now. – Nico Bellic Apr 15 '12 at 5:31
@Nico: One possibility: we can view the set of all $m\times n$ matrices as a vector space; if we do that, then that vector space has dimension $mn$. But that's not the dimension of a single matrix, but of the vector space of matrices. – Arturo Magidin Apr 15 '12 at 5:33
Ah I see. Is there a proof to that? – Nico Bellic Apr 15 '12 at 5:43
The $nm$ matrices that have a single entry equal to $1$ and $0$s everywhere else, one for each entry, are a basis of that vector space. – Arturo Magidin Apr 15 '12 at 5:52
Oh duh. Oh my I feel very dumb now. – Nico Bellic Apr 15 '12 at 5:55