<s>[INST] Why does the Minus-1 trick to get particular and general solutions work? Minus-1 trick: A practical trick where the reduced row-echelon form of a system of equations is augmented with -1 rows. It is used to get particular and general solutions.
While it is a handy trick, I was wondering why does it work.
The following is an example of the minus-1 trick from the book Mathematics for Machine Learning Book

 [/INST] In the example, set the non-pivot variables to $x_2=-\lambda_1$, $x_5=-\lambda_2$ and solve the system for other variables. You will get the exact same result.
The minus-1 trick is just a schematic way to achieve the same with less writing.
Another way to look at this: The columns $1$, $3$ and $4$ of $A$ are the standard basis of the column space. Using these you can uniquely express the remaining two columns:
\begin{align*}
\color{blue}{\begin{pmatrix} 3\\0\\0\end{pmatrix}} &= 3 \begin{pmatrix}1\\0\\0\end{pmatrix} + 0 \begin{pmatrix}0\\1\\0\end{pmatrix} + 0 \begin{pmatrix}0\\0\\1\end{pmatrix},
\\
\color{blue}{\begin{pmatrix} 3\\9\\-4\end{pmatrix}} &= 3 \begin{pmatrix}1\\0\\0\end{pmatrix} + 9 \begin{pmatrix}0\\1\\0\end{pmatrix} -4 \begin{pmatrix}0\\0\\1\end{pmatrix}.
\end{align*}
We can rewrite these two equations as
\begin{align*}
3 \begin{pmatrix}1\\0\\0\end{pmatrix} \color{blue}{{}- 1 \begin{pmatrix} 3\\0\\0\end{pmatrix}} + 0 \begin{pmatrix}0\\1\\0\end{pmatrix} + 0 \begin{pmatrix}0\\0\\1\end{pmatrix} + \color{red}{0 \begin{pmatrix} 3\\9\\-4\end{pmatrix}} &= \begin{pmatrix}0\\0\\0\end{pmatrix},
\\
3 \begin{pmatrix}1\\0\\0\end{pmatrix} + \color{red}{0 \begin{pmatrix} 3\\0\\0\end{pmatrix}} + 9 \begin{pmatrix}0\\1\\0\end{pmatrix} - 4 \begin{pmatrix}0\\0\\1\end{pmatrix} \color{blue}{{}- 1 \begin{pmatrix} 3\\9\\-4\end{pmatrix}} &= \begin{pmatrix}0\\0\\0\end{pmatrix},
\end{align*}
Hence, we have two (linearly independent) solutions to $Ax=0$ given by
$$
\begin{pmatrix} 3\\\color{blue}{-1}\\0\\0\\\color{red}{0} \end{pmatrix},
\begin{pmatrix} 3\\\color{red}{0}\\9\\-4\\\color{blue}{-1} \end{pmatrix}.
$$
Again, the minus-1 trick is just a schematic way to achieve the same result mechanically.
</s>