I have to solve the following exercise:
Solve the following sets of equations
$$X + 2Y = 4 \\ X + 3Z = 5 \\ 2Y - Z = 1$$.
I know that I must first find two equations which have the same values. However, equations 1 and 2 both have the same $X$ values but then have a $Y$ value and a $Z$ value so you can't take away these values.
Equations 2 and 3 both have Z values but they also have a X and Y value so you can't eliminate this also.
So what would I need to do.
The trick is to get two equations that involve only two unknowns. See below:
Subtract #2 from #1. This gives you a new equation that I'll call #4: $$ 2Y - 3Z = -1 $$ Now we have two equations (#3 and the new #4) that only involve $Y$ and $Z$. Subtract #3 from #4. This gives $$ -2Z = -2 $$ So $Z=1$. Substitute this back into #2, and you get $X+3 = 5$, so $X=2$.
Substitute $X=2$ in #1, and we get $2+2Y=4$. So $Y=1$.