How do I solve this 3-D system of linear equations using Gaussian elimination?

50 Views Asked by At

I have the following system of equations:

$x+2y+3z = -6$

$2x - 3y - 4z = 15$

$3x + 4y + 5z = -8$

I came up with this:

$x + 2y + 3z = -6$

$-7y - 10z = 18$

$5x + y + z = 7$

Can you tell me the best way forward? Also, am I doing it "wrong"?

Edit:

OK, here's what I got:

\begin{align}x + 2y + 3z &= -6\\ -14y - 20z &= 36\\ 2y - 24z &= 55\end{align}

I'm starting to question whether this should have happened.

1

There are 1 best solutions below

2
On

Here's how I proceeded the first time. Notice that at every step I am keeping track of exactly what I did (which is something you must do with Gaussian Elimination). Also, you should know that when I broke my own rule of meticulously tracking each and every step (i.e., I tried to rush through the computation), I made an error in arithmetic and had to go back and redo the bulk of these computations.

Start with the original system: \begin{align} x+2y+3z &= -6\\ 2x - 3y - 4z &= 15\\ 3x + 4y + 5z &= -8 \end{align} Subtract twice the first equation from the second to get: \begin{align} x+2y+3z &= -6\\ - 7y - 10z &= 27\\ 3x + 4y + 5z &= -8 \end{align} Subtract three times the first equation from the first to get: \begin{align} x+2y+3z &= -6\\ - 7y - 10z &= 27\\ -2y - 4z &= 10 \end{align} Divide the third equation by $-2$ to get: \begin{align} x+2y+3z &= -6\\ - 7y - 10z &= 27\\ y + 2z &= -5 \end{align} Subtract twice the third equation from the first to get: \begin{align} x-z &= 4\\ -7y-10z &= 27\\ y + 2z &= -5 \end{align}

And you should be able to take it from here. (Sorry this is less of a hint and more of a solution, but I wanted to exhibit exactly where this elimination method was going from the first step).


One of the keys to this was taking the first equation, noticing I had a $1$ coefficient on $x$, and setting about to eliminate $x$ from every other equation. I then looked at $y$, and noticed that with a couple of row operations, I could get one of the other equations to have a $1$ coefficient on $y$, allowing me to eliminate it.

Notice that when I stopped (and where you take over), I had eliminated the the $x's$ from the second and third equations, $y$'s from the first equation, and now I am set up in a way that lets me eliminate $y$'s from the second equation, yielding the solution for $z$. Once I have done this, I use the equation giving the solution for $z$ eliminate $z$ from the first and third equations, yielding the solution to the system.