## Computing the image and kernel of a linear transformation

Let $V$ be an $n$-dimensional vector space with basis $B = \{e_i\}_{i=1}^n$ and let $W$ be an $m$-dimensional vector space with basis $E = \{f_i\}_{i=1}^m$. Let $\varphi : V \rightarrow W$ be a linear transformation, and let $A = M^E_B(\varphi)$. (That is, the $j$th column of $A$ is the coordinates of $e_j$ in terms of the ordered basis $E$. Let $A^\prime$ be the reduced row echelon form of $A$.

1. Prove that the dimension of $\mathsf{im}\ \varphi$ is the row rank (i.e. number of nonzero rows) of $A^\prime$. Prove moreover that the columns of $A$ corresponding to the pivotal columns of $A^\prime$ form a basis of $\mathsf{im}\ \varphi$.
2. Note that the kernel of $\varphi$ is precisely the solution of the equation $A^\prime X = 0$. We saw how to solve such equations in this previous exercise. Prove that $\varphi$ is injective if and only if $A^\prime$ has row rank $n$. If $\varphi$ is not injective, construct a basis for $\mathsf{ker}\ \varphi$.

1. Write $A = [A_1 | \cdots | A_n]$ as a column matrix. Then $A[x_1 | \cdots | x_n]^\mathsf{T} = \sum A_i x_i$. In particular, the image of $\varphi$ is the span of the columns of $A$. In particular, as we showed previously, the columns of $A$ corresponding to the pivotal columns of $A^\prime$ form a basis of $\mathsf{im}\ \varphi$. In particular, the dimension of this image is the row rank of $A^\prime$.
2. Note that $\varphi$ is injective if and only if $\mathsf{im}\ \varphi$ has dimension $n$, if and only if (by part 1) $A^\prime$ has row rank $n$. We showed previously how to construct the solutions of $A^\prime X = 0$; specifically, for each nonpivotal column of $A^\prime$, we fix one corresponding entry in $X$ to be 1 and the other (nonpivotal) entries 0. The other entries of $X$ are then determined uniquely. These vectors are certainly linearly independent, and generate $\mathsf{ker}\ \varphi$.