Domain and range

Let $$T:V\rightarrow W$$ be a linear transformation where $$V$$ and $$W$$ are vector spaces with scalars coming from the same field $$\mathbb{F}$$.

$$V$$ is called the domain of $$T$$ and $$W$$ the codomain. The range of $$T$$, denoted by $$\operatorname{range}(T)$$, is the set of all possible outputs. Mathematically, $\operatorname{range}(T) = \{ T(x) : x \in V\}.$ Sometimes, one uses the image of $$T$$, denoted by $$\operatorname{image}(T)$$, to refer to the range of $$T$$.

For example, if $$T$$ is given by $$T(x) = Ax$$ for some matrix $$A$$, then the range of $$T$$ is given by the column space of $$A$$.

Surjection

$$T$$ is said to be surjective (or onto) if its range equals the codomain. In casual terms, it means that every vector in $$W$$ can be the output of $$T$$. If $$T$$ is surjective, it is called a surjection.

Example

Let $$T:\mathbb{Q}^2\rightarrow \mathbb{Q}^2$$ be given by $$T\left(\begin{bmatrix} x_1\\x_2\end{bmatrix}\right)= \begin{bmatrix} x_1-x_2\\-x_1+x_2\end{bmatrix}$$. Note that every vector in $$\operatorname{range}(T)$$ is of the form $$\begin{bmatrix} a\\-a\end{bmatrix}$$ since $$-x_1+x_2 = -(x_1-x_2)$$. Hence, $$T$$ is not surjective since there are vectors in $$\mathbb{Q}^2$$ (e.g. $$\begin{bmatrix} 1\\0\end{bmatrix}$$) that are not in the range of $$T$$.

Injection

$$T$$ is said to be injective (or one-to-one) if for all distinct $$x,y\in V$$, $$T(x) \neq T(y)$$. In casual terms, it means that different inputs lead to different outputs. If $$T$$ is injective, it is called an injection.

Example

Consider the same $$T$$ in the example above. It is not injective because for every $$a\in\mathbb{Q}$$, $T\left(\begin{bmatrix} a\\a\end{bmatrix}\right) =\begin{bmatrix} a-a\\-a+a\end{bmatrix} =\begin{bmatrix} 0\\0\end{bmatrix}.$

Bijection

If $$T$$ is both surjective and injective, it is said to be bijective and we call $$T$$ a bijection.

Testing surjectivity and injectivity

Since $$\operatorname{range}(T)$$ is a subspace of $$W$$, one can test surjectivity by testing if the dimension of the range equals the dimension of $$W$$ provided that $$W$$ is of finite dimension.

For example, if $$T$$ is given by $$T(x) = Ax$$ for some matrix $$A$$, $$T$$ is a surjection if and only if the rank of $$A$$ equals the dimension of the codomain. (Recall that the rank of $$A$$ gives the dimension of the column space of $$A$$.)

To test injectivity, one simply needs to see if the dimension of the kernel is 0. If it is nonzero, then the zero vector and at least one nonzero vector have outputs equal $$0_W$$, implying that the linear transformation is not injective.

Conversely, assume that $$\ker(T)$$ has dimension 0 and take any $$x, y\in V$$ such that $$T(x) = T(y)$$. Then $$T(x-y) = T(x)-T(y) = 0_W$$, implying that $$x-y\in \ker(T)$$. As $$\ker(T)$$ has dimension 0 and thus contains only the zero vector, we must have $$x-y = 0_V$$, implying that $$x=y$$. So no two distinct inputs lead to the same output. Hence, $$T$$ is injective.

For example, if $$T$$ is given by $$T(x) = Ax$$ for some matrix $$A$$, then $$T$$ is an injection if and only if the nullity of $$A$$ is 0.

Example

Let $$T:\mathbb{R}^3 \rightarrow \mathbb{R}^2$$ be a linear transformation given by $T~\left ( \begin{bmatrix} a \\ b \\ c\end{bmatrix} \right ) = \begin{bmatrix} a-b-c \\ -a + b\end{bmatrix}.$ Note that $T~\left ( \begin{bmatrix} a \\ b \\ c\end{bmatrix} \right ) = A \begin{bmatrix} a\\b\\c\end{bmatrix}$ where $$A = \begin{bmatrix} 1 & -1 & -1 \\ -1 & 1 & 0\end{bmatrix}$$. The reduced row-echelon form of $$A$$ is $$\begin{bmatrix} 1 & -1 & 0 \\ 0 & 0 & 1\end{bmatrix}$$. Thus $$A$$ has rank 2 and nullity 1. Since the rank is equal to the dimension of the codomain $$\mathbb{R}^2$$, we see from the above discussion that $$T$$ is surjective. But $$T$$ is not injective since the nullity of $$A$$ is not zero.

Rank-nullity theorem for linear transformations

The following generalizes the rank-nullity theorem for matrices: $\dim(\operatorname{range}(T)) + \dim(\ker(T)) = \dim(V).$

Exercises

For each of the following linear transformations, determine if it is a surjection or injection or both.

1. $$T:\mathbb{R}^2\rightarrow \mathbb{R}^2$$ given by $$T\left(\begin{bmatrix} x\\y\end{bmatrix}\right) = \begin{bmatrix} x+y \\ 2x-y \end{bmatrix}$$.

2. $$T:\mathbb{C}^2\rightarrow \mathbb{C}^3$$ given by $$T(z) = Az$$ where $$A = \begin{bmatrix} i & 2 \\ -1 & 1 \\ 0 & 1 \end{bmatrix}$$.

3. $$T:P_2 \rightarrow \mathbb{R}^2$$ where $$P_2$$ denotes the vector space of polynomials in $$x$$ with real coefficients having degree at most $$2$$ and $$T$$ is given by $$T(ax^2+bx+c) = \begin{bmatrix} a+b \\ b-c\end{bmatrix}$$.