Instead of solving your homework for you, I'll show you how each of the methods work with a slightly harder system of linear equations.
Here's the system of linear equations that'll I'll be working on:
$$\begin{cases} x-3y+\frac 43z = 2 \\ 2x- z =1 \\ 3y-4z=0\end{cases}$$
What does solving this system of linear equations mean? If means that we find an $x$, a $y$, and a $z$ that works in all $3$ equations.
So let's try a couple of different approaches:
Substitution Method:
For this method we want to solve for on variable in terms of other variables and then plug that into a different equation. This can help us reduce the number of variables in a given equation. Let's see how it works:
I notice that the second and third equations each only have $2$ variables so let's start with one of them. I'll start with the second equation and I'll isolate one variable on one side and everything else on the other side:
$$2x-z=1 \implies z=2x-1$$
Now that we have this, we can plug it in to the other two equations. Then we have the new -- and equivalent system:
$$\begin{cases} x-3y+\frac 43z = x-3y+\frac 43(2x-1) = \frac {11}3x -3y -\frac 43 = 2 \\ z=2x-1 \\ 3y-4z= 3y-4(2x-1) = -8x+3y+4=0 \end{cases} \\ \iff \begin{cases} \frac {11}3x -3y = \frac {10}3 \\ z=2x-1 \\ -8x + 3y = -4\end{cases}$$
Notice now that the first and third equations have only two variables -- and importantly they're the same two variables. So let's solve for one variable in one of them and then plug that expression into the other one:
$$-8x + 3y = -4 \implies x = \frac {3y+4}{8}$$
Now let's plug this expression into the first equation to get a new set of equations:
$$\begin{cases} \frac {11}3x -3y = \frac {11}3(\frac {3y+4}{8}) - 3y = \frac {11}8 y + \frac {11}6 -3y=\frac {10}3 \\ z=2x-1 \\ -8x + 3y = -4\end{cases} \\ \iff \begin{cases} y=-\frac {12}{13} \\ z=2x-1 \\ -8x + 3y = -4\end{cases}$$
Now that we've solved for one, we're just about done. Plug $y=-\frac {12}{13}$ into the equation $-8x + 3y = -4$ to get $x=\frac 2{13}$, then plug that into $z=2x-1$ to get $z=-\frac 9{13}$. And we're done!
Elimination Method:
For this method, we'll be adding/ subtracting multiples of one equation from another to get rid of variables. Let's see how it works:
I notice that if I added the third equation to the first, the $y$ term would cancel out of each. So let's do that:
$$x-3y+\frac 43z =2 \\
\underline{+\ \ \ \ \ 3y-4z = 0} \\
\ \ \ \ \ \ \ x-\frac 83z = 2$$
If we replace our first equation with this new one, we get a new set of equations:
$$\begin{cases} x-\frac 83z = 2 \\ 2x- z =1 \\ 3y-4z=0\end{cases}$$
Now notice that if we subtracted $2$ times the first equation from the second we could get rid of the $x$'s. So let's do that:
$$ 2x- z =1\\
\underline{-\ \ \ (2x-\frac {16}3z =4)} \\
\frac {13}3z =-3$$
Solving that we get $z = -\frac 9{13}$. Plugging that into the first equation then gets us $x$ and into the third equation gets us $y$. Done.
Coefficient Matrix Method:
Notice that we really only need $x$, $y$, and $z$ as placeholders in our calculations until the very end -- all of the math ends up just affecting the coefficients. So let's rewrite our system without those $x$'s, $y$'s, and $z$'s getting in the way. We'll write it as a matrix:
$$\left[\begin{array}{ccc|c}
1 & -3 & \frac 43 & 2 \\
2 & 0 & -1 & 1 \\
0 & 3 & -4 & 0
\end{array}\right]$$
Make sure you understand how I built this matrix.
Now remember that this is just a more convenient way of writing a system of linear equations. Also remember that there are a few things we can do to a system of equations without changing the solutions. We can
- Multiply both sides of an equation by a nonzero constant.
- Rearrange the order of the equations.
- Add a multiple of one equation to another.
How do we perform these three operations on our matrices? Each of these operations is equivalent to the following operations on our matrix:
- Multiply any row by a nonzero constant.
- Reorder the rows of our matrix.
- Add a multiple of a row to another row.
Now that we have these operations, what should our goal be? It'd be nice if we could get the matrix into the form
$$\left[\begin{array}{ccc|c}
1 & 0 & 0 & a \\
0 & 1 & 0 & b \\
0 & 0 & 1 & c
\end{array}\right]$$
because then if we converted this matrix back into equation form we'd just have
$$\begin{cases} x + 0y + 0z = x = a \\
0x + y + 0z = y = b \\
0x + 0y + z = c\end{cases}$$
and then we could just read off our answers. So now that we have our operations and we have a goal, let's see if we can achieve that goal:
$$\left[\begin{array}{ccc|c}
1 & -3 & \frac 43 & 2 \\
2 & 0 & -1 & 1 \\
0 & 3 & -4 & 0
\end{array}\right]_{R_2 \to R_2 - 2\cdot R_1} \\ \sim
\left[\begin{array}{ccc|c}
1 & -3 & \frac 43 & 2 \\
0 & 6 & -\frac {11}3 & -3 \\
0 & 3 & -4 & 0
\end{array}\right]_{R_2 \to \frac 16R_2} \\ \sim
\left[\begin{array}{ccc|c}
1 & -3 & \frac 43 & 2 \\
0 & 1 & -\frac {11}{18} & -\frac 12 \\
0 & 3 & -4 & 0
\end{array}\right]_{R_3 \to R_3-3\cdot R_2} \\ \sim
\left[\begin{array}{ccc|c}
1 & -3 & \frac 43 & 2 \\
0 & 1 & -\frac {11}{18} & -\frac 12 \\
0 & 0 & -\frac {13}6 & \frac 32
\end{array}\right]_{R_3 \to -\frac 6{13}\cdot R_3} \\ \sim
\left[\begin{array}{ccc|c}
1 & -3 & \frac 43 & 2 \\
0 & 1 & -\frac {11}{18} & -\frac 12 \\
0 & 0 & 1 & -\frac 9{13}
\end{array}\right]_{R_2 \to R_2 + \frac {11}{18}\cdot R_3} \\ \sim
\left[\begin{array}{ccc|c}
1 & -3 & \frac 43 & 2 \\
0 & 1 & 0 & -\frac {12}{13} \\
0 & 0 & 1 & -\frac 9{13}
\end{array}\right]_{R_1 \to R_1 +3\cdot R_2 -\frac 43\cdot R_3} \\ \sim
\left[\begin{array}{ccc|c}
1 & 0 & 0 & \frac 2{13} \\
0 & 1 & 0 & -\frac {12}{13} \\
0 & 0 & 1 & -\frac 9{13}
\end{array}\right]$$
Which gives us the answer $x=\frac 2{13}$, $y=-\frac {12}{13}$, $z=-\frac 9{13}$ -- exactly what we found above.
$x-\frac{3}{2} y = 1$. – May 17 '15 at 02:42