Have a vector space formed by the vectors $(x_1,x_2,x_3,x_4)$ that satisfy
$$\begin{cases} x_1+x_2-x_3-3x_4=0\\ 2x_1+x_3-2x_4=0 \end{cases}$$
Find a basis and also the dimension of $S$.
I am not very experienced with this sort of question - I remember an example, so I did the exact same steps. My final answer is different from the one that the exercise posted, but it may be because there can be multiple basis. Anyway, it's at the bottom.
I heard that you should first solve the system
$$\begin{bmatrix} 1 & 1 & -1 & -3 & 0\\ 2 & 0 & 1 & -2 & 0 \end{bmatrix}$$
$$-2r_1+r_2$$
$$\begin{bmatrix} 1 & 1 & -1 & -3 & 0\\ 0 & -2 & 3 & 4 & 0 \end{bmatrix}$$
$$-\frac{1}{2}r_2$$
$$\begin{bmatrix} 1 & 1 & -1 & -3 & 0\\ 0 & 1 & -3/2 & -2 & 0 \end{bmatrix}$$
$$-r_2+r_1$$
$$\begin{bmatrix} 1 & 0 & 1/2 & -1 & 0\\ 0 & 1 & -3/2 & -2 & 0 \end{bmatrix}$$
Now, let
$$x_3 = s\\ x_4 = t$$
The solutions to the system would be
$$x_1 = -\frac{s}{2}+t\\ x_2 = \frac{3s}{2}+2t\\ x_3 = t\\ x_4 = s$$
A basis could then written like
$$B = \{ (x_1,x_2,x_3,x_4) \ | \ s \cdot (-1/2,3/2,0,1) + t \cdot (1,2,1,0)\}$$
$$B = \{ (-1/2,3/2,0,1) , (1,2,1,0) \}$$
It has two dimensions.
The answer, from the book, is
$$B = \{ (-1/2,3/2,\color{red}{1,0}) , (1,2,\color{red}{0,1}) \}$$
I got the number of dimensions right, so there's that. However I am not sure if my basis calculation was right (there's a small difference you see). Can you tell if I did it right? This sort of question is still confusing.
Here is another way:
Let $A=\begin{bmatrix} 1 & 1 \\ 2 & 0 \end{bmatrix} $, $B=\begin{bmatrix} -1 & -3 \\ 1 & -2 \end{bmatrix} $, and note that $A^{-1} = {1 \over 2} \begin{bmatrix} 0 & 1 \\ 2 & -1 \end{bmatrix} $, and $B$ is invertible.
Then the equations can be written as $A \binom{x_1}{x_2} + B \binom{x_3}{x_4}=0$, or $\binom{x_1}{x_2} = - A^{-1} B \binom{x_3}{x_4}$.
It follows that the dimension is 2 (since $A^{-1}B$ is invertible), and we can compute a basis by choosing $(x_3,x_4) = (1,0)$ and then $(x_3,x_4) = (0, 1)$. Performing the computations gives $(-{1 \over 2}, {3 \over 2}, 1 , 0)$, $(1,2, 0,1)$.