Example of computing image and kernel

Consider the map $$\begin{align*} S: && \R^3 &\to \R^2 \\ &&(x,y,z) &\mapsto (x+y, 2x-z). \end{align*}$$

This is a linear map because $$\begin{align*} S(\lambda\vec v_1 + \mu\vec v_2) &= \big((\lambda x_1 + \mu x_2) + (\lambda y_1 + \mu y_2), 2(\lambda x_1 + \mu x_2) - (\lambda z_1 + \mu z_2)\big) \\ &= \lambda(x_1+y_1, 2x_1 - z_1) + \mu(x_2 + y_2, 2x_2 - z_2) \\ &= \lambda S(\vec v_1) + \mu S(\vec v_2). \end{align*}$$

Consider the effect of $S$ on the standard basis of $\R^3$: $$\begin{align*} S(1,0,0) &= (1,2) \\ S(0,1,0) &= (1,0) \\ S(0,0,1) &= (0,-1) \end{align*}$$ These three image vectors span $\R^2$, so $\mrm{image}(S) = \R^2$.

For the kernel of $S$, we solve $$\begin{cases} x + y &= 0 \\ 2x-z &= 0 \end{cases}$$ which gives $$ \vec v = (x,-x,2x) \quad \forall x\in\R. $$ Therefore $\mrm{kernel}(S) = \mrm{span}\se{(x,-x,2x)}$.