# How to do solve system of equations with three variables?

Apr 3, 2015

If there are $3$ variables, then there must be $3$ equations.

Lets say $A , B , C$ are our equations and $x , y , z$ are the variables.

You will follow these three steps:

• By using $C$, write $z$ in terms of $x$ and $y$

• Replace $z$ with its equivalent in $B$. Then write $y$ in terms of $x$

• In $A$, replace $y$ with its equivalent and replace $z$ with its equivalent (if its equivalent involves $y$, replace $y$) then solve $A$ for $x$.

Now you should know the value of $x$. You should have written $y$ in terms of $x$ so plug $x$ and you will find $y$.

Finally, you should have written $z$ in terms of $x$ and $y$ so you can find the value of $z$.

Example

$A : x + y + z = 10$

$B : 2 x + y + z = 12$

$C : 3 x + 2 y + z = 17$

Lets find $x , y , z$

We are writing $z$ in terms of $x$ and $y$ by using $C$, and I will call this equation as $1 '$

$z = 17 - 3 x - 2 y$

Now we are plugging $1 '$ to $B$

$2 x + y + \left(17 - 3 x - 2 y\right) = 12$
$- x - y = - 5$

So we can write $y$ in terms of $x$. I will call this equation as $2 '$

$y = 5 - x$

Now we are plugging $1 '$ and $2 '$ to $A$. (We also replaced $y$ in $1 '$ by using $2 '$)

$x + \left(5 - x\right) + \left(17 - 3 x - 2 \left(5 - x\right)\right) = 10$

$5 + 17 - 3 x - 10 + 2 x = 10$

$- x = - 2 \to x = 2$

Now we know the value of $x$. So:

By using $2 '$, $y = 3$

By using $1 '$, $z = 17 - 3 \cdot 2 - 2 \cdot \left(3\right) = 5$

So $x = 2 , y = 3 , z = 5$