# Solving a linear equation system with 3 equations and 5 unknowns

I'm trying to solve this system with 3 equations and 5 unknowns: $$\left\{\matrix{x_1+x_2-2x_3+x_4+3x_5=1\\2x_1-x_2+2x_3+2x_4+6x_5=2\\3x_1+2x_2-4x_3-3x_4-9x_5=3}\right.$$ using Gaussian elimination, and I'm very close to getting the right answer. According to my book, the answer should be: $$x=\left(\matrix{1\\0\\0\\0\\0}\right) + s \left(\matrix{0\\2\\1\\0\\0}\right) + t \left(\matrix{0\\0\\0\\-3\\1}\right),\ s,t\in\mathbb{R}$$ I also want to avoid getting fractal scalars when reducing the system to row-echelon form, such that leading coefficients e.g. 2 and 3 in row2 and row3 are reduced with $$2\over3$$ or $$3\over2$$.

• Unfortunately, the purported solution in your question doesn’t actually solve the system of equations. In particular, if you substitute into the first equation and simplify, you’ll end up with $4s+1=1$ instead of $1=1$. Check for sign errors in your transcription: I believe that the first equation should have either $-x_2$ or $-2x_3$ instead.
– amd
Mar 14, 2019 at 0:44
• @Moo The given solution can’t be generated from your rref.
– amd
Mar 14, 2019 at 0:48
• BTW, the rref of the correct system of equations has only integer entries.
– amd
Mar 14, 2019 at 0:50
• You're right, there was a sign error: it should be $-2x_3$ on row 1. Just fixed it now. Mar 14, 2019 at 14:05

With Gaussian elimination, I reduced the system in row-echelon form: $$\left(\matrix{1&1&-2&1&3\\2&-1&2&2&6\\3&2&-4&-3&-9}\middle|\matrix{1\\2\\3}\right)\sim\matrix{r_2-2r_1\\r_3-3r_1}\sim r_3-{r_2\over3}\sim\matrix{r_2/3\\r_3/6}\sim\left(\matrix{1&1&-2&1&3\\0&-1&2&0&0\\0&0&0&-1&-3}\middle|\matrix{1\\0\\0}\right)$$ Then I converted it to a linear equation system and isolate the leading coefficients $$x_1$$, $$x_2$$ and $$x_4$$: $$\left\{\matrix{x_1+x_2-2x_3+x_4+3x_5=1\\-x_2+2x_3=0\\-x_4-3x_5=0}\right.\leftrightarrow\left\{\matrix{x_1=1-x_2+2x_3-x_4-3x_5\\x_2=2x_3\\x_4=-3x_5}\right.$$ Thus, I define the remaining coefficients: $$\matrix{x_3=s\\x_5=t}\ \ s,t\in\mathbb{R}$$ Finally, I get: $$\left\{\matrix{x_1=1\\x_2=2s\\x_3=s\\x_4=-3t\\x_5=t}\right.$$
• i.e., in the $3 \times 5$ matrix you reached to, you shall isolate a rank $3$ block (you chosed columns 1,2,4) and take the remaining variables as parameters( $s$ and $t$) to bring to the known column on the right. Mar 14, 2019 at 15:05