How to choose a basis for the kernel of a matrix? I am not sure how to choose a basis for the kernel of a matrix. I've seen a video where someone chose for the kernel
$$\ker(A) = \ker\begin{pmatrix} -1 & 1 & 0 & 1 \\  0 & 0 & 4 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}$$
the basis
$$ \mathcal B =\left\{\begin{pmatrix} 1 \\ 1 \\  0 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \\  0 \\ -1 \end{pmatrix}\right\}$$
but I do not understand why those vectors were chosen.
Using the rank-nullity-theorem you can conclude there are two linear independent vector that span the $\ker(A)$ since ${\rm rank}(A)=2$ and $\dim(\ker(A))= n-{\rm rank}(A)=4-2=2$ but how do I choose those linear independent vectors?
Can anyone explain that to me?
 A: Hint: You have already figured out that the kernel has dimension 2. The vectors $x$ in the kernel satisfy $-x_1+x_2+x_4=0$ and $4 x_3=0$.
You just need to find two vectors in the kernel that are linearly independent. They will form a basis of the kernel.
A: An alternative approach: the columns of a matrix tell you what the images of the basis vectors are. So you can see that the image of the second basis vector is minus the image of the first one, since the first and second column only differ by their sign. Consequently, the sum of the first two basis vectors will be mapped to the sum of their images, which is $0$. Similarly the images of the second and fourth basis vectors are equal. So their difference will be mapped to the difference of their images, which is again $0$. Und thus you have two linearly independent vectors contained in the kernel: $b_1+b_2$ and $b_2-b_4$.
This approach won't take you far if the kernel is less simple (its basis vectors only have two non-zero components here). But for some simple matrices, you can quickly see wether it works, and then you don't need to solve a system of equations.
