Null Space & Range

The last page watched matrices move the plane. This page names the kind of function a matrix is, and then studies the two subspaces every such function carries with it: the inputs it kills and the outputs it reaches. Those two spaces are tied together by one count, the Dimension Theorem, and they answer the two questions you ask about any function, whether it ever doubles up and whether it reaches everything.

On the Geometry page, every matrix was a move: stretch, flip, shear, turn, squash. All those moves share one habit. They send a sum of two arrows to the sum of their images, and a stretched arrow to the stretched image. That habit has a name, linear, and once a function has it, two pictures tell you almost everything about it: the set of inputs it squashes to $0$, and the set of outputs it can reach. This page draws both, counts their dimensions, and shows that the two counts always add up.

Linear Transformations

Here is the habit, written down. It is the one property a function needs to get along with vector arithmetic.

Let $\V$ and $\W$ be vector spaces. A function $T\colon \V \to \W$ is a linear transformation (or linear map) from $\V$ to $\W$ if, for all $x, y \in \V$ and $c \in \R$,

(a) $T(x + y) = T(x) + T(y)$ and

(b) $T(cx) = cT(x)$.

We often simply call $T$ linear.

A function $T$ from $\R^2$ or $\R^3$ to $\R^2$ or $\R^3$ is a linear transformation (or linear map) if it sends sums to sums and stretched arrows to stretched images: for all inputs $x, y$ and every number $c$,

(a) $T(x + y) = T(x) + T(y)$ and

(b) $T(cx) = cT(x)$.

In words: it doesn't matter whether you add first and then apply $T$, or apply $T$ first and then add. Same for scaling. A few facts fall out right away, and the second one is the test you'll actually use.

Let $T\colon \V \to \W$.

1. If $T$ is linear, then $T(0) = 0$.

2. $T$ is linear if and only if $T(cx + y) = cT(x) + T(y)$ for all $x, y \in \V$ and $c \in \R$.

3. If $T$ is linear, then $T(x - y) = T(x) - T(y)$ for all $x, y \in \V$.

4. If $T$ is linear, then $T(a_1x_1 + \cdots + a_nx_n) = a_1T(x_1) + \cdots + a_nT(x_n)$ for all $x_1, \ldots, x_n \in \V$ and $a_1, \ldots, a_n \in \R$.

Show proof

(1) By (b), $T(0) = T(0 \cdot 0) = 0 \cdot T(0) = 0$.

(2) If $T$ is linear, then $T(cx + y) = T(cx) + T(y) = cT(x) + T(y)$ by (a) and then (b). Conversely, suppose $T(cx + y) = cT(x) + T(y)$ always. Taking $x = y = 0$ and $c = 1$ gives $T(0) = 2T(0)$, so $T(0) = 0$. Then $c = 1$ gives (a), and $y = 0$ gives $T(cx) = cT(x) + T(0) = cT(x)$, which is (b).

(3) is (2) with $c = -1$. (4) is (2) used $n - 1$ times: $T(a_1x_1 + (a_2x_2 + \cdots)) = a_1T(x_1) + T(a_2x_2 + \cdots)$, and so on. $\blacksquare$

Why it's true (picture)

This is a visual argument, not a formal proof. $cx + y$ is a chain: $c$ steps of $x$, then $y$. A linear map sends each leg of the chain to the scaled image, so the chain of images lands on $T(cx + y)$; that's rule 2, and rules 3 and 4 are longer chains. And the origin is a chain of nothing, so it can't move: $T(0) = 0$.

The full proof is in the n version.

Property 1 is the fastest way to kill a candidate: if $T(0) \neq 0$, you're done, it's not linear. Property 2 is how you show a map is linear, with one calculation instead of two.

Show that $T\colon \R^2 \to \R^3$ defined by $T(a_1, a_2) = (a_1 + 3a_2, \ -a_2, \ 2a_1)$ is linear.


Use property 2. Let $c \in \R$, $x = (b_1, b_2)$, and $y = (d_1, d_2)$. Then $cx + y = (cb_1 + d_1, \ cb_2 + d_2)$, so

$$\begin{aligned} T(cx + y) &= \big((cb_1 + d_1) + 3(cb_2 + d_2), \ -(cb_2 + d_2), \ 2(cb_1 + d_1)\big) \\ &= c\,(b_1 + 3b_2, \ -b_2, \ 2b_1) + (d_1 + 3d_2, \ -d_2, \ 2d_1) \\ &= cT(x) + T(y). \end{aligned}$$

So $T$ is linear. Notice why it worked: every coordinate of the output is a sum of constants times the $a_i$'s. No constants added on, no squares, no products.

That's no accident. Every map $x \mapsto Ax$ is linear, because $A(x + y) = Ax + Ay$ and $A(cx) = c(Ax)$ (Matrices). The example's $T$ is the map of the $3 \times 2$ matrix with rows $(1, 3)$, $(0, -1)$, $(2, 0)$. Every move on the Geometry page was a linear transformation, and the next page shows the converse: every linear map between $\R^n$'s is a matrix.

Show that $T(a_1, a_2) = (a_1 + 2, \ a_2)$ and $U(a_1, a_2) = (a_1a_2, \ a_1)$ are not linear.


$T(0, 0) = (2, 0) \neq (0, 0)$, so $T$ fails property 1.

$U(0, 0) = (0, 0)$, so property 1 can't catch this one. Try scaling instead: $U(2(1, 1)) = U(2, 2) = (4, 2)$, but $2U(1, 1) = 2(1, 1) = (2, 2)$. Those aren't equal, so $U$ fails (b).

Here's what each map does to a grid of inputs. The linear one keeps the grid a grid; the shift moves the origin; the product bends the lines.

That second map is the one to remember.

Passing $T(0) = 0$ does not make a map linear. $U$ above passes it and still isn't linear. Property 1 can only rule maps out. To rule one in, check property 2 for every $x$, $y$, and $c$, with letters, not with a couple of numbers you picked.

See how each kind of map behaves. Pick a map, then roll some $x$, $y$, and $c$. The red dot is $T(cx + y)$ and the blue dot is $cT(x) + T(y)$. Decide whether the map is linear.

Linear or Not?

The absolute value one is sneaky: it passes every roll with $c \geq 0$, because scaling by a positive number commutes with $|\cdot|$. One negative $c$ breaks it. That's why "it worked on my examples" is not a proof. Your turn to spot the linear one; the choices are formulas, so this question stays multiple choice.

Loading practice engine...

$|{-1}| \cdot 5 = 5$ but $|{-5}| = 5$ too, so … wait, that one works. Ugh. Okay, $|{-1} \cdot 5| = 5$ and $-1 \cdot |5| = -5$. There it is.

Two linear transformations show up so often they get names.

For any vector space $\V$, the identity transformation $I_{\V}\colon \V \to \V$ is defined by $I_{\V}(x) = x$ for all $x \in \V$.

The other one is its opposite: it keeps nothing.

For vector spaces $\V$ and $\W$, the zero transformation $T_0\colon \V \to \W$ is defined by $T_0(x) = 0$ for all $x \in \V$.

The zero transformation takes every vector you give it and throws it away. Lazy. Technically linear. Honestly, goals.

Both pass property 2 in one line: $I_{\V}(cx + y) = cx + y = cI_{\V}(x) + I_{\V}(y)$, and $T_0(cx + y) = 0 = c \cdot 0 + 0$. The rotation by $90°$, $T(a_1, a_2) = (-a_2, a_1)$, the reflection across the $x$-axis, $T(a_1, a_2) = (a_1, -a_2)$, and the projection onto the $x$-axis, $T(a_1, a_2) = (a_1, 0)$, are linear for the same reason as the first example: every output coordinate is constants times the inputs. You'll get to play with all three in a minute.

Null Space and Range

Every linear map comes with two subspaces attached: what it kills, and what it hits.

Let $\V$ and $\W$ be vector spaces, and let $T\colon \V \to \W$ be linear. The null space (or kernel) $\N(T)$ of $T$ is the set of all vectors $x$ in $\V$ with $T(x) = 0$; that is, $\N(T) = \{x \in \V : T(x) = 0\}$.

The null space (or kernel) $\N(T)$ of a linear map $T$ is the set of all inputs that $T$ sends to $0$: $\N(T) = \{x : T(x) = 0\}$.

And the outputs, with the word you've used since precalculus.

The range (or image) $\Rg(T)$ of $T$ is the subset of $\W$ consisting of all images (under $T$) of vectors in $\V$; that is, $\Rg(T) = \{T(x) : x \in \V\}$.

The range (or image) $\Rg(T)$ of a linear map $T$ is the set of all its outputs: $\Rg(T) = \{T(x) : x \text{ an input}\}$.

For the map of a matrix, these are two of the four subspaces: the null space of $x \mapsto Ax$ is $\N(A)$, the solutions of $Ax = 0$, and its range is $\col(A)$, the span of the columns. Everything this page proves about $\N(T)$ and $\Rg(T)$ is something you've already seen drawn for a $3 \times 3$ matrix.

The two named maps are the two extremes.

Find the null space and range of the identity $I_{\V}$ and of the zero transformation $T_0\colon \V \to \W$.


$I_{\V}(x) = x$ is $0$ only for $x = 0$, so $\N(I_{\V}) = \{0\}$, and every $x$ is its own output, so $\Rg(I_{\V}) = \V$: nothing gets killed, everything gets hit. For the zero transformation it's the opposite: $T_0(x) = 0$ for every $x$, so $\N(T_0) = \V$ and $\Rg(T_0) = \{0\}$.

Every other linear map lives somewhere in between, and the first thing to know is that both sets are subspaces.

Let $T\colon \V \to \W$ be linear. Then $\N(T)$ is a subspace of $\V$ and $\Rg(T)$ is a subspace of $\W$.

Show proof

Use the subspace test. Since $T(0) = 0$, we have $0 \in \N(T)$. Let $x, y \in \N(T)$ and $c \in \R$. Then $T(x + y) = T(x) + T(y) = 0 + 0 = 0$ and $T(cx) = cT(x) = c \cdot 0 = 0$, so $x + y$ and $cx$ are in $\N(T)$.

Because $T(0) = 0$, we have $0 \in \Rg(T)$. Let $x, y \in \Rg(T)$ and $c \in \R$. Then $x = T(v)$ and $y = T(w)$ for some $v, w \in \V$, so $T(v + w) = T(v) + T(w) = x + y$ and $T(cv) = cT(v) = cx$. Thus $x + y$ and $cx$ are outputs, so they are in $\Rg(T)$. $\blacksquare$

Why it's true (picture)

This is a visual argument, not a formal proof. Two inputs that go to $0$ have a sum that goes to $0 + 0 = 0$, and scaling an input that goes to $0$ gives $c \cdot 0 = 0$: the null space survives adding and scaling. Two outputs $T(v)$ and $T(w)$ add up to $T(v + w)$, another output, and $cT(v) = T(cv)$ is an output too. Both sets hold $0$ because $T(0) = 0$.

The full proof is in the n version.

Finding the null space means solving $T(x) = 0$, which you already know how to do. Finding the range sounds harder ("all outputs"), but the next theorem makes it easy: you only need the outputs of a basis.

Let $T\colon \V \to \W$ be linear. If $\beta = \{v_1, v_2, \ldots, v_n\}$ is a basis for $\V$, then

$$\Rg(T) = \span\{T(v_1), T(v_2), \ldots, T(v_n)\}.$$
Show proof

Each $T(v_i)$ is an output, so it is in $\Rg(T)$. Because $\Rg(T)$ is a subspace, it contains every combination of them: $\span\{T(v_1), \ldots, T(v_n)\} \subseteq \Rg(T)$ (the smallest-subspace theorem).

Now suppose $w \in \Rg(T)$, so $w = T(v)$ for some $v \in \V$. Because $\beta$ is a basis, $v = a_1v_1 + \cdots + a_nv_n$ for some scalars, and since $T$ is linear,

$$w = T(v) = a_1T(v_1) + \cdots + a_nT(v_n) \in \span\{T(v_1), \ldots, T(v_n)\}.$$

So $\Rg(T)$ is contained in the span, and the two are equal. $\blacksquare$

Why it's true (picture)

This is a visual argument, not a formal proof. Every input is some steps of $e_1$ and some steps of $e_2$, so every output is the same steps of $T(e_1)$ and $T(e_2)$: the grid of inputs becomes the grid built on the two images. The outputs are exactly the points that grid reaches, its span.

The full proof is in the n version.

Since the standard basis is right there, the move in $\R^n$ is always the same: plug in $e_1, \ldots, e_n$ and take the span of what comes out.

Let $T\colon \R^3 \to \R^2$ be defined by $T(a_1, a_2, a_3) = (a_1 + 2a_2, \ a_2 - a_3)$. Find $\N(T)$ and $\Rg(T)$.


Null space. Solve $T(a_1, a_2, a_3) = (0, 0)$:

$$\begin{aligned} a_1 + 2a_2 &= 0 \\ a_2 - a_3 &= 0. \end{aligned}$$

So $a_3 = a_2$ and $a_1 = -2a_2$, with $a_2$ free. Every solution is $(-2a_2, a_2, a_2) = a_2(-2, 1, 1)$, so $\N(T) = \span\{(-2, 1, 1)\}$, a line through the origin.

Range. By the theorem, $\Rg(T) = \span\{T(e_1), T(e_2), T(e_3)\} = \span\{(1, 0), (2, 1), (0, -1)\}$. The vectors $(1, 0)$ and $(0, -1)$ already span $\R^2$, so $\Rg(T) = \R^2$.

The null line on the input side, and the three images filling the output plane.

The Dimension Theorem

In that example, $\N(T)$ was a line (dimension $1$) and $\Rg(T)$ was a plane (dimension $2$), and $\R^3$ has dimension $3$. That's not a coincidence. First, names for those two dimensions.

Let $T\colon \V \to \W$ be linear with $\N(T)$ finite-dimensional. The nullity of $T$, written $\nullity(T)$, is the dimension of $\N(T)$.

And the matching number on the output side.

Let $T\colon \V \to \W$ be linear with $\Rg(T)$ finite-dimensional. The rank of $T$, written $\rank(T)$, is the dimension of $\Rg(T)$.

Two maps you've already met, counted.

Find the nullity and rank of the example map $T(a_1, a_2, a_3) = (a_1 + 2a_2, \ a_2 - a_3)$, and of the projection $P(x, y) = (x, 0)$.


For $T$, the null space was the line through $(-2, 1, 1)$ and the range was all of $\R^2$: $\nullity(T) = 1$ and $\rank(T) = 2$. For $P$, the null space is the $y$-axis (everything with $x = 0$) and the range is the $x$-axis: $\nullity(P) = 1$ and $\rank(P) = 1$. In both cases the two numbers add up to the dimension of the inputs, $3$ and $2$.

Nullity. Sounds like a supervillain. "Fear me, for I am NULLITY, and I shall send your vectors to ZERO." …Only some of them, though. It depends on the rank.

The more a map kills, the less it can hit. Exactly how much less is the most-used theorem in this part of the course.

Let $T\colon \V \to \W$ be linear. If $\V$ is finite-dimensional, then

$$\nullity(T) + \rank(T) = \dim(\V).$$
Show proof

Suppose $\dim(\V) = n$, $\dim(\N(T)) = k$, and $\{v_1, \ldots, v_k\}$ is a basis for $\N(T)$. By Bases & Dimension we may extend it to a basis $\beta = \{v_1, \ldots, v_n\}$ for $\V$. We claim that $S = \{T(v_{k+1}), \ldots, T(v_n)\}$ is a basis for $\Rg(T)$, with these $n - k$ images distinct.

$S$ spans $\Rg(T)$: by the previous theorem $\Rg(T) = \span\{T(v_1), \ldots, T(v_n)\}$, and $T(v_i) = 0$ for $i \leq k$, so $\Rg(T) = \span(S)$.

$S$ is linearly independent: suppose $b_{k+1}T(v_{k+1}) + \cdots + b_nT(v_n) = 0$. By linearity $T(b_{k+1}v_{k+1} + \cdots + b_nv_n) = 0$, so $b_{k+1}v_{k+1} + \cdots + b_nv_n \in \N(T)$, which means it equals $c_1v_1 + \cdots + c_kv_k$ for some scalars. Moving everything to one side gives a relation among the vectors of $\beta$, which is a basis, so every coefficient is $0$: $b_{k+1} = \cdots = b_n = 0$. (The same argument shows the $T(v_i)$ for $i > k$ are distinct.) So $S$ is a basis of $\Rg(T)$ with $n - k$ vectors, and $\rank(T) = n - k$. $\blacksquare$

Why it's true (picture)

This is a visual argument, not a formal proof. Take a basis of the null space, then add arrows until you have a basis of all the inputs. Every input is a mix of all those arrows; $T$ throws away the null part, so every output is a mix of the images of the added arrows. And those images can't loop (a loop among them would mean a mix of the added arrows lies in the null space, which the basis forbids). So the added arrows count the range: nullity plus rank is the number of inputs' dimensions.

The full proof is in the n version.

The proof's first move is the extension theorem from Bases & Dimension: extend a basis of the null space to a basis of all of $\V$. The new vectors are exactly the ones whose images build the range. For a matrix, this is the Four Subspaces count $\dim\N(A) + \dim\col(A) = n$.

Watch it happen. Drag where $e_1$ and $e_2$ land on the right; by the range theorem, that decides the whole range. Squash the two images onto one line and a red null space appears on the left. However you drag, nullity and rank always add up to $2$.

Where $e_1$ and $e_2$ Go

The presets are the maps from earlier. The rotation and reflection kill nothing and hit everything: nullity $0$, rank $2$. The projection kills the whole $y$-axis and only hits the $x$-axis: nullity $1$, rank $1$. Drag both images to $0$ and you've built $T_0$: nullity $2$, rank $0$.

The Dimension Theorem is a counting tool. You can often say a lot about a map before computing a single thing.

Can a linear transformation $T\colon \R^3 \to \R^2$ have $\N(T) = \{0\}$?


No. $\Rg(T)$ is a subspace of $\R^2$, so $\rank(T) \leq 2$ (a subspace's dimension is at most the space's). Then the Dimension Theorem gives

$$\nullity(T) = 3 - \rank(T) \geq 3 - 2 = 1.$$

So $\N(T)$ always contains a whole line, at least. Squeezing three dimensions into two always crushes something.

Your turn to count. In free response, type the rank and then the nullity, like 2, 1.

Loading practice engine...

One-to-One and Onto

The null space has a second job: it tells you whether $T$ ever sends two different vectors to the same place. First, the two words, which work for any function.

A function $T\colon \V \to \W$ is one-to-one if $T(x) = T(y)$ implies $x = y$. That is, different inputs always give different outputs.

The other word is about the outputs.

A function $T\colon \V \to \W$ is onto if $\Rg(T) = \W$. That is, every vector of $\W$ is an output.

Try both words on the projection.

Is the projection $P\colon \R^2 \to \R^2$, $P(x, y) = (x, 0)$, one-to-one? Onto?


Not one-to-one: $P(1, 5) = P(1, -2) = (1, 0)$, two different inputs with one output. Not onto: the output $(0, 1)$ is never produced, since every output has second coordinate $0$. (The rotation by $90°$, on the other hand, is both: it has an inverse, the rotation back.)

For a general function, checking one-to-one means comparing every pair of inputs. For a linear map, you only have to look at what goes to $0$.

Let $T\colon \V \to \W$ be linear. Then $T$ is one-to-one if and only if $\N(T) = \{0\}$.

Show proof

Suppose that $T$ is one-to-one and $x \in \N(T)$. Then $T(x) = 0 = T(0)$. Since $T$ is one-to-one, $x = 0$. Hence $\N(T) = \{0\}$.

Now assume $\N(T) = \{0\}$, and suppose $T(x) = T(y)$. Then $0 = T(x) - T(y) = T(x - y)$ by property 3, so $x - y \in \N(T) = \{0\}$. Thus $x - y = 0$, that is, $x = y$: $T$ is one-to-one. $\blacksquare$

Why it's true (picture)

This is a visual argument, not a formal proof. If two inputs $x$ and $y$ land on the same output, then $T(x - y) = T(x) - T(y) = 0$: their difference is a null vector, and a nonzero one, since $x \neq y$. Run it backward: if the only null vector is $0$, two inputs can't share an output, because their difference would have to be $0$.

The full proof is in the n version.

The proof says something even better than the theorem. If $T(x) = T(y)$, then $x - y$ is in the null space. So the inputs that share an output with $x$ are exactly $x$ plus null space vectors. Drag $x$ around and watch its whole crowd move with it.

Same Output

With the squash, every output is shared by a whole dashed line of inputs: a copy of $\N(T)$ slid over to pass through $x$. With the shear, $\N(T) = \{0\}$, the line shrinks to the single point $x$, and nobody shares.

That slid-over copy of the null space is the shape of every solution set on Solution Sets: the inputs with $T(x) = b$ are one particular solution plus the whole null space. Same picture, now for any linear map.

When $\V$ and $\W$ have the same dimension, the Dimension Theorem welds the two properties together.

Let $\V$ and $\W$ be vector spaces of equal (finite) dimension, and let $T\colon \V \to \W$ be linear. Then the following are equivalent.

(a) $T$ is one-to-one.

(b) $T$ is onto.

(c) $\rank(T) = \dim(\V)$.

Show proof

From the Dimension Theorem, $\nullity(T) + \rank(T) = \dim(\V)$. By the previous theorem, $T$ is one-to-one if and only if $\N(T) = \{0\}$, if and only if $\nullity(T) = 0$, if and only if $\rank(T) = \dim(\V)$, if and only if $\rank(T) = \dim(\W)$, that is, $\dim(\Rg(T)) = \dim(\W)$. By Bases & Dimension, a subspace with the full dimension is the whole space, so this is equivalent to $\Rg(T) = \W$, the definition of onto. $\blacksquare$

Why it's true (picture)

This is a visual argument, not a formal proof. A map from the plane to the plane sends the grid to a grid of parallelograms. Either that grid is flat (a line) or it isn't. Flat means two failures at once: outputs off the line are missed, and inputs double up. Not flat means both successes at once: the grid covers the whole plane and no two inputs collide. The two properties can't come apart because they're the same picture.

The full proof is in the n version.

The hypothesis is not decoration.

The theorem needs $\dim(\V) = \dim(\W)$, and it's easy to forget. A map $\R^2 \to \R^3$ can be one-to-one without being onto (its range is at most a plane in $\R^3$), and a map $\R^3 \to \R^2$ can be onto without being one-to-one (that's the example above). Equal dimensions first, then one property buys you the other.

With equal dimensions in hand, the theorem turns an onto proof into a null-space computation.

Show that $T\colon \R^2 \to \R^2$ defined by $T(a_1, a_2) = (a_1 + a_2, \ a_1 - a_2)$ is onto.


Proving onto directly means solving $T(a_1, a_2) = (b_1, b_2)$ for every $(b_1, b_2)$. The theorem lets you check the null space instead. If $T(a_1, a_2) = (0, 0)$, then $a_1 + a_2 = 0$ and $a_1 - a_2 = 0$. Adding gives $2a_1 = 0$, so $a_1 = 0$ and then $a_2 = 0$. So $\N(T) = \{0\}$, $T$ is one-to-one, and since both spaces have dimension $2$, $T$ is onto.

Your turn: decide both properties at once. The four verdicts are the four choices, so this one stays multiple choice.

Loading practice engine...

One more way to see one-to-one, straight from independence. It's a good one to try proving before you peek.

Let $T\colon \V \to \W$ be linear. Prove that $T$ is one-to-one if and only if $T(D)$ is linearly independent for every linearly independent subset $D$ of $\V$.


Show proof

Proof. Suppose $T$ is one-to-one and $D$ is a linearly independent subset of $\V$. Let $w_1, \ldots, w_n$ be distinct vectors of $T(D)$ and $c_1, \ldots, c_n \in \R$ with $c_1w_1 + \cdots + c_nw_n = 0$. Choose $v_1, \ldots, v_n \in D$ with $T(v_i) = w_i$; they are distinct because the $w_i$ are. Then

$$T\Big(\sum_{i=1}^n c_iv_i\Big) = \sum_{i=1}^n c_iT(v_i) = \sum_{i=1}^n c_iw_i = 0,$$

so $\sum c_iv_i \in \N(T) = \{0\}$. Since $D$ is linearly independent, $c_1 = \cdots = c_n = 0$. Hence $T(D)$ is linearly independent.

Conversely, suppose $T(D)$ is linearly independent whenever $D$ is. Let $x \neq 0$. Then $D = \{x\}$ is linearly independent, so $\{T(x)\}$ is linearly independent, which means $T(x) \neq 0$. So the only vector in $\N(T)$ is $0$, and $T$ is one-to-one. $\blacksquare$

A Map Is Decided by a Basis

The range theorem said the images of a basis build the whole range. The last theorem goes further: they build the whole map. You can send the basis vectors anywhere you like, and there's exactly one linear map that does it.

Let $\V$ and $\W$ be vector spaces, and suppose that $\{v_1, v_2, \ldots, v_n\}$ is a basis for $\V$. For any $w_1, w_2, \ldots, w_n$ in $\W$, there exists exactly one linear transformation $T\colon \V \to \W$ with $T(v_i) = w_i$ for $i = 1, 2, \ldots, n$. In particular, two linear maps that agree on a basis agree everywhere.

Show proof

Let $x \in \V$. Then $x = \sum_{i=1}^n a_iv_i$ for unique scalars $a_1, \ldots, a_n$ (Bases & Dimension). Define $T(x) = \sum_{i=1}^n a_iw_i$.

$T$ is linear: for $u = \sum b_iv_i$, $v = \sum c_iv_i$, and $d \in \R$, $du + v = \sum (db_i + c_i)v_i$, so $T(du + v) = \sum (db_i + c_i)w_i = d\sum b_iw_i + \sum c_iw_i = dT(u) + T(v)$. And $T(v_i) = w_i$, since $v_i$'s coordinates are $0$ except for a $1$ in slot $i$.

$T$ is unique: if $U$ is linear with $U(v_i) = w_i$, then for $x = \sum a_iv_i$, $U(x) = \sum a_iU(v_i) = \sum a_iw_i = T(x)$. Hence $U = T$, which is also the last sentence of the theorem. $\blacksquare$

Why it's true (picture)

This is a visual argument, not a formal proof. Every input is one walk along the basis arrows (that's what a basis is), and a linear map has to send that walk to the same walk along the images. So once the images are chosen, every output is forced: there's nothing left to decide. The "Where $e_1$ and $e_2$ Go" widget above was this theorem the whole time, with two drags deciding the map.

The full proof is in the n version.

In practice it means two facts about a linear map can be enough to compute it anywhere. The trick is to write the input as a combination of the vectors you know.

Suppose $T\colon \R^2 \to \R^3$ is linear, and $T(-1, 0) = T(1, 1) = (1, 2, 3)$. What is $T(0, 2)$?


First write $(0, 2)$ as a combination of $(-1, 0)$ and $(1, 1)$. Try $a(-1, 0) + b(1, 1) = (0, 2)$: the second coordinate says $b = 2$, and the first says $-a + b = 0$, so $a = 2$. So $(0, 2) = 2(-1, 0) + 2(1, 1)$. Now use linearity:

$$\begin{aligned} T(0, 2) &= 2T(-1, 0) + 2T(1, 1) \\ &= 2(1, 2, 3) + 2(1, 2, 3) = (4, 8, 12). \end{aligned}$$

Bonus: since $T(-1, 0) = T(1, 1)$, this $T$ isn't one-to-one. Their difference $(1, 1) - (-1, 0) = (2, 1)$ is a nonzero vector in $\N(T)$.

The two walks, in the inputs and in the outputs, and the null vector that falls out.

The step people skip is the first one.

Don't plug the coordinates of the input straight in as coefficients. $(0, 2)$ is $0e_1 + 2e_2$, but you weren't told $T(e_1)$ or $T(e_2)$. The coefficients have to be the ones for the vectors you were told about, so solve for them first.

Your turn. In free response, type the output's entries separated by commas, like 4, 8, 12.

Loading practice engine...

If two images decide a map $\R^2 \to \R^3$, why not just write them down side by side as columns? That's a matrix, and it's the next page: every linear map between $\R^n$'s is $x \mapsto Ax$ for exactly one $A$.

Application: Shadows

The friendliest linear map with a real null space is the one the sun makes at noon.

Sunlight falls straight down on the floor, so a point $(x, y, z)$ in the air casts the shadow $(x, y)$: the map $T\colon \R^3 \to \R^2$, $T(x, y, z) = (x, y)$. Find $\N(T)$, $\Rg(T)$, the nullity and rank, and all the points whose shadow is $(1, 3)$.


$T$ is linear (each output coordinate is a coordinate of the input, so sums go to sums and scalings to scalings). $T(x, y, z) = (0, 0)$ exactly when $x = y = 0$, so $\N(T) = \{(0, 0, z)\} = \span\{(0, 0, 1)\}$: the vertical line, nullity $1$. Every $(x, y)$ is the shadow of $(x, y, 0)$, so $\Rg(T) = \R^2$, rank $2$, and $1 + 2 = 3$.

The points with shadow $(1, 3)$ are $(1, 3, z)$ for every $z$: one particular point $(1, 3, 0)$ plus the whole null space, a vertical line. That's the crowd from the Same Output widget, in three dimensions: everything directly above $(1, 3)$ casts the same shadow.

A camera does the same thing with perspective, and a flat map of the Earth does it with a sphere: every picture that loses a dimension has a null direction, the direction the picture can't see. The Dimension Theorem says how much is lost: as many dimensions as the null space has.

The toolkit for this page: test linearity with $T(cx + y) = cT(x) + T(y)$. Find $\N(T)$ by solving $T(x) = 0$, and $\Rg(T)$ as the span of the images of a basis. Nullity plus rank is $\dim(\V)$. $T$ is one-to-one exactly when $\N(T) = \{0\}$, and with equal dimensions, one-to-one and onto come together. A linear map is decided by where it sends a basis.

Mixed Practice

Every question so far came right after its idea, which is a hint a quiz never gives you. Down here the hint is gone. First, true or false: a claim from anywhere on this page, and you decide whether it holds.

Loading practice engine...

Next, a mixed set: every question type on this page, shuffled. Type vectors on one line with commas, and a rank and nullity as two numbers. The which-map and one-to-one/onto questions stay multiple choice.

Loading practice engine...

Made it this far? Time for something with a little heat. You're told two images, and they happen to be parallel. That's a clue: something is getting crushed. Find it, then write it in ordinary coordinates. In free response, type any nonzero vector of the null space.

🌶️ SPICY BONUS 🌶️

Loading practice engine...