TITLE: Find a basis $A$ of space $\mathbb R^{4}$ and basis $B$ of space $\mathbb R^{3}$
QUESTION [5 upvotes]: Let $\varphi: \mathbb R^{4} \rightarrow \mathbb R^{3}$: $$\varphi(x_{1},x_{2},x_{3},x_{4})=(x_{1}+x_{3}+x_{4},x_{1}+x_{2}+2x_{3}+3x_{4},x_{1}-x_{2}-x_{4})$$Find a basis $A$ of space $\mathbb R^{4}$ and basis $B$ of space $\mathbb R^{3}$ such that $M(\varphi)^{B}_{A}={\begin{bmatrix}1&0&0&0\\0&1&0&0\\0&0&0&0\end{bmatrix}}$

I think that I know how to do this task. However I really need an assessment if it is correct.My try:$M(\varphi)^{st}_{st}={\begin{bmatrix}1&0&1&1\\1&1&2&3\\1&-1&0&-1\end{bmatrix}}$After elementary operations on the matrix $M(\varphi)^{st}_{st}$ I have system of equations: $\begin{cases} 
x_{1}+x_{3}+x_{4}=0 \\ 
x_{2}+x_{3}+2x_{4}=0\end{cases}$ So $\ker \varphi=lin\left\{(-1,-1,1,0),(-1,-2,0,1)\right\}$. This vectors are in a basis $A$ but I need two more vectors.$\dim(\ker\varphi)=2$ so $\dim(im \varphi)=2$ and it can be: $(1,1,1),(0,1,-1)$ (I take $2$ linearly independent vectors from the matrix $M(\varphi)^{st}_{st}$ columns). This vectors are in a basis $B$.In this moment I have $A=\left\{\alpha_{1}, \alpha_{2},(-1,-1,1,0),(-1,-2,0,1)\right\}$ and $B=\left\{(1,1,1),(0,1,-1),\beta_{3}\right\}$From $M(\varphi)^{B}_{A}$ I have:$\varphi(\alpha_{1})=1 \cdot \beta_{1}$$\varphi(\alpha_{2})=1 \cdot \beta_{2}$$\varphi(\alpha_{3})=0$$\varphi(\alpha_{4})=0$That is why:$\varphi(\alpha_{1})=(1,1,1)$ and $\alpha_{1}=(1,0,0,0)$$\varphi(\alpha_{2})=(0,1,-1)$ and$\alpha_{2}=(0,1,0,0)$$\beta_{3}$ I can choose anyway because I do not have any dependencies on it. It can be linerly indipendent from other basis vectors, so it can be $\beta=(0,0,1)$
I will be extremely grateful for checking this solution and indicating any errors.

REPLY [3 votes]: You are guessing. There is no need to.
If the required bases are, respectively $\{v_1,v_2,v_3,v_4\}$ and $\{w_1,w_2,w_3\}$, then the condition for the matrix translates into
$$
\varphi(v_1)=w_1,\quad
\varphi(v_2)=w_2,\quad
\varphi(v_3)=0,\quad
\varphi(v_4)=0
$$
The idea is then to complete a basis of the kernel, which you performed correctly.
Since $\ker\phi$ is the set of vectors satisfying
\begin{cases}
x_{1}+x_{3}+x_{4}=0 \\
x_{1}+x_{2}+2x_{3}+3x_{4}=0\\
x_{1}-x_{2}-x_{4}=0
\end{cases}
you can do elimination
$$
\begin{bmatrix}
1 & 0 & 1 & 1 \\
1 & 1 & 2 & 3 \\
1 & -1 & 0 & -1
\end{bmatrix}\to
\begin{bmatrix}
1 & 1 & 0 & 1 \\
0 & 1 & 1 & 2 \\
0 & -1 & -1 & -2
\end{bmatrix}\to
\begin{bmatrix}
1 & 0 & 1 & 1 \\
0 & 1 & 1 & 2 \\
0 & 0 & 0 & 0
\end{bmatrix}
$$
so a basis of $\ker\varphi$ is given by $v_3=(-1,-1,1,0)$, $v_4=(-1,-2,0,1)$. Now complete to a basis of $\mathbb{R}^4$ finding the null space of
$$
\begin{bmatrix}
-1 & -1 & 1 & 0 \\
-1 & -2 & 0 & 1
\end{bmatrix}
$$
The elimination yields
$$
\to
\begin{bmatrix}
1 & 1 & -1 & 0 \\
0 & -1 & -1 & 1
\end{bmatrix}
\to
\begin{bmatrix}
1 & 1 & -1 & 0 \\
0 & 1 & 1 & -1
\end{bmatrix}
\to
\begin{bmatrix}
1 & 0 & -2 & 1 \\
0 & 1 & 1 & -1
\end{bmatrix}
$$
which provides $v_1=(2,-1,1,0)$ and $v_2=(-1,1,0,1)$. Note that, by construction, $\{\varphi(v_1),\varphi(v_2)\}$ is linearly independent. Now take
$$
w_1=\varphi(v_1)=(3,3,2)\qquad w_2=\varphi(v_2)=(0,3,-3)
$$
and complete this to a basis of $\mathbb{R}^3$ finding the null space of
\begin{bmatrix}
3 & 3 & 2 \\
0 & 3 & -3
\end{bmatrix}
Elimination:
$$
\to
\begin{bmatrix}
1 & 1 & 2/3 \\
0 & 1 & -1
\end{bmatrix}
\to
\begin{bmatrix}
1 & 0 & 5/3 \\
0 & 1 & -1
\end{bmatrix}
$$
so the vector you need is $w_3=(-5/3,1,1)$.