<s>[INST] Determine all solutions of the linear equation system $A \vec{x} = \vec{b} = \begin{bmatrix} 2 \\ 4 \\ 18\\ -10 \end{bmatrix}$ Could you give me your feedback ?

Determine **all** solutions of the linear equation system $A \vec{x} = \vec{b}$ for
$$A = \begin {bmatrix}
1 & -2 & 4 & 3 & 2 \\
-7 & 14 & -28 & -12 & -23 \\
4 & -8 & 12 & 12 & 8 \\
-3 & 6 & -4 & -1 & -14
\end {bmatrix} , \vec{b} = \begin{bmatrix} 2 \\ 4 \\ 18\\ -10 \end{bmatrix} $$

Add 3 first row to fourth row, add -4 first row to third row,add 7 first row to second row. Then divide second row by 9, divide third row by -4, divide fourth row by 8. Then add -1 second row to fourth row, add -1 third row to fourth row [EDIT: and add -4 third row to first row]. Then add 2 second row to first row.
$$A = \begin {bmatrix}
1 & -2 & 4 & 3 & 2 \\
0 & 0 & 0 & 9 & -9 \\
0 & 0 & -4 & 0 & 0 \\
0 & 0 & 8 & 8 & -8
\end {bmatrix}  = \begin {bmatrix}
1 & -2 & 4 & 3 & 2 \\
0 & 0 & 0 & 1 & -1 \\
0 & 0 & 1 & 0 & 0 \\
0 & 0 & 1 & 1 & -1
\end {bmatrix} = \begin {bmatrix}
1 & -2 & 0 & 3 & 2 \\
0 & 0 & 0 & 1 & -1 \\
0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 0
\end {bmatrix} = \begin {bmatrix}
1 & -2 & 0 & 5 & 0 \\
0 & 0 & 0 & 1 & -1 \\
0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 0
\end {bmatrix} $$
$\vec{b} = \begin{bmatrix} 2 \\ 18 \\ 10\\ -4 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \\ -5/2\\ -1/2 \end{bmatrix} = $[EDIT]$ \begin{bmatrix} 12 \\ 2 \\ -5/2\\ 0 \end{bmatrix} = \begin{bmatrix} 16 \\ 2 \\ -5/2\\ 0 \end{bmatrix} $
So we get $x_3 = -5/2, x_4 = x_5 + 2, $ [EDIT] $ x_1 = 16 + 2x_2 -5x_4 = 16 - 10 + 2x_2 - 5x_5 = 6 + 2x_2 -5x_5$ with $x_2, x_5$ free
[EDIT: forgot to add -4 third row to first row in step 3. Problem solved now]
Is this correct ? When I plug that into a calculator https://matrix.reshish.com/gaussSolution.php they get the same result except $x_1 = 6 + 2x_2 -5x_5$, is this something to worry about ?
Thanks for your help !
 [/INST] I took these steps

*

*$(01)~ R_2: R_2 + 7 R_1$

*$(02)~ R_3: R_3 - 4 R_1$

*$(03)~ R_4: R_4 + 3 R_1$

*$(04)~$ Swap $R_2$ with $R_4$

*$(05)~ R_3: R_3 + \dfrac{1}{2} R_2$

*$(06)~$ Swap $R_3$ with $R_4$

*$(07)~ R_4: R_4 -\dfrac{4}{9} R_3$

*$(08)~ R_3: \dfrac{1}{9} R_3$

*$(09)~ R_2: R_2 - 8 R_3$

*$(10)~ R_1: R_1 - 3 R_3$

*$(11)~ R_2: \dfrac{1}{8} R_2$

*$(12)~ R_1: R_1 - 4 R_2$
The final result is
$$\begin{pmatrix}
 1 & -2 & 0 & 0 & 5 & 6 \\
 0 & 0 & 1 & 0 & 0 & -\dfrac{5}{2} \\
 0 & 0 & 0 & 1 & -1 & 2 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
\end{pmatrix}$$
This means
$$x_4 = 2 + x_5, x_3 = -\dfrac{5}{2}, x_1 = 6 + 2 x_2 -5 x_5$$
You answer has an issue. You should get the same as the book.
You can test it by plugging it back in and seeing that it does not work.
</s>