How to find a basis of an image of a linear transformation?

I apologize for asking a question though there are pretty much questions on math.stackexchange with the same title, but the answers on them are still not clear for me.

I have this linear operator:

$$ Ax = (2x_1-x_2-x_3, x_1-2x_2+x_3, x_1+x_2-2x_3); $$

And I need to find the basis of the kernel and the basis of the image of this transformation.

First, I wrote the matrix of this transformation, which is:

$$ \begin{pmatrix} 2 & -1 & -1 \\ 1 & -2 & 1 \\ 1 & 1 & -2\end{pmatrix} $$

I found the basis of the kernel by solving a system of 3 linear equations:

$$ \begin{pmatrix} 2 & -1 & -1 \\ 1 & -2 & 1 \\ 1 & 1 & -2\end{pmatrix}\begin{pmatrix} x_1 \\ x_2 \\ x_3\end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0\end{pmatrix} $$

It is

$$ kerA = (1,1,1) $$

But how can I find the basis of the image? What I have found so far is that I need to complement a basis of a kernel up to a basis of an original space. But I do not have an idea of how to do this correctly. I thought that I can use any two linear independent vectors for this purpose, like

$$ imA = \{(1,0,0), (0,1,0)\} $$

because the image here is $\mathbb{R}^2$

But the correct answer from my textbook is:

$$ imA = \{(2,1,1), (-1,2,1)\} $$

And by the way I cannot be sure that there is no error in the textbook's answer.

So could anyone help me with this. I will be very grateful, thank you in advance.


Solution 1:

Reducing your matrix $$ \begin{pmatrix} 2 & -1 & -1 \\ 1 & -2 & 1 \\ 1 & 1 & -2\end{pmatrix} $$ to row-echelon form gives $$\begin{pmatrix} 1 & -2 & 1\\0 & 1 & -1\\0 & 0 & 0\end{pmatrix},$$

and a basis for the image of $A$ is given by a basis for the column space of your matrix, which we can get by taking the columns of the matrix corresponding to the leading 1's in any row-echelon form.

This gives the basis $\{(2,1,1), (-1,-2,1)\}$ for the image of $A$.

Solution 2:

The image of a basis of the domain gives a spanning set for the image. You may have to reduce this spanning set to get a basis for the image.