# Solving Systems of Equations (Linear Algebra)

How would I solve this system of equations?

$$x_1 - x_2 + x_3 - x_4 = 0 \\ x_1 + 2x_2 + 3x_3 + 4x_4 = 0$$

So far I have made it to:

$$x_2 = \frac{-2 x_3}{3} - \frac{5 x_4}{3} \\ x_1 = \frac{5 x_3}{3} + \frac{2 x_4}{3}$$

But I'm not sure what to do next...

• Do you mean the second expression to be 0? That is, do you really mean this:$$x_1 + 2x_2 + 3x_3 + 4x_4 = 0 \quad \quad ?$$ – Michael Oct 11 '18 at 0:21
• yes I do sorry. – user594350 Oct 11 '18 at 0:32
• In general you can do "Gaussian elimination" to find the null space. In this case you can just replace $x_4$ with $x_1-x_2+x_3$ in the second equality and get an equation involving only $x_1, x_2, x_3$. – Michael Oct 11 '18 at 0:34

octave:1> rref([1, -1, 1, -1; 1, 2, 3, 4])
ans =

1.00000   0.00000   1.66667   0.66667
0.00000   1.00000   0.66667   1.66667


It seems that you have made a mistake earlier, the answer should be

$$x_2 = \frac{-2 x_3}{3} - \frac{5 x_4}{3} \\ x_1 = \color{red}-\frac{5 x_3}{3} \color{red}- \frac{2 x_4}{3}$$

Let $$x_3=s$$ and $$x_4=t$$,

then we have

$$x_2 = -\frac{2s}{3}-\frac{5t}{3}$$

$$x_1 = -\frac{5s}{3} - \frac{2t}{3}$$

That is

$$(x_1,x_2, x_3, x_4) = s\left( -\frac53, -\frac23, 1, 0 \right) + t\left( -\frac23, -\frac53, 0, 1 \right)$$

• yes it should've been negative, I seemed to have just forgotten that. Thank you. – user594350 Oct 11 '18 at 1:16