# Thread: Gaussian Elimination Method Question?

1. ## Gaussian Elimination Method Question?

Hi
Can someone tell me where is my mistake, my solution doesn't agree with the book's answers.

1) Use Gaussian elimination, solve the equation for x and y:
$2x+4y=-2$
$-x+3y=-7$

$\begin{bmatrix}
2 & 4 | & -2 \\
-1 & 3 | & 7
\end{bmatrix}$

2R2 - R1 -> R1

$\begin{bmatrix}
2 & 4 | & -2 \\
-1 & 3 | & 7
\end{bmatrix}$

R1 - R2 -> R2

$\begin{bmatrix}
2 & 4 | & -2 \\
-1 & 3 | & 7
\end{bmatrix}$

$-x+2y=16$
$x=2$
$y=-9$

correct answer is x=2.2 and y=-1.6
P.S

2. when u have small sys like this u can :
$2x+4y=-2$
$-x+3y=-7$ this one let's say $\cdot 2$

$2x+4y=-2$
$-2x+6y=-14$

sum them...

$10y=-16 \to y=-1.6$

and when u have $y$ u can get $x$ ...

3. yes, i know you can use that method, but the question asked to use Gaussian Elimination method.

4. Gaussian Elimination method is based on basic transformations of linear equations... (hope u know that.... there's 3 basic transformation)

now... if u look at sys : (sys No 1)
$a_{11}x_{1}+a_{12}x_{2}+ . . . +a_{1n}x{n}=b_{1}$
$a_{21}x_{1}+a_{22}x_{2}+ . . . +a_{2n}x{n}=b_{2}$
$a_{31}x_{1}+a_{32}x_{2}+ . . . +a_{3n}x{n}=b_{3}$

$. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .$

$a_{m1}x_{1}+a_{m2}x_{2}+ . . . +a_{mn}x{n}=b_{m}$

now we assume that $a_{11} \neq 0$ and first equation of sys No 1 multiply with $- \frac {a_{21}}{a_{11}}$ and we add it to the second equation and multiply with $- \frac {a_{31}}{a_{11}}$ and we add to the 3rd equation and so on .... we get new sys (No 2) :

$a_{11}x_{1}+a_{12}x_{2}+ . . . +a_{1n}x{n}=b_{1}$
$a_{22}x_{2}+ . . . +a_{2n}x{n}=b_{m}$
and so on...

using same procedure after $(k-1)$ repetition u get sys

$a_{11}x_{1}+a_{12}x_{2}+ . . . +a_{1n}x{n}=b_{1}$
$a_{22} x_{2}+ . . . +a_{1n}x{n}=b_{1}$

$. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .$

$a_{kk}x_{k}+ . . . +a_{kn}x{n}=b_{k}$

witch is equivalent to sys No 1 ....
if $k=n$ sys have unique solution.... if $k < n$ sys have infinite solutions . But if in any repetition u get coefficients at least one equations are zeros and free member different from zero it means that sys have no solutions....

as for this small sys u have... first one multiply with $- \frac {a_{21}}{a_{11}}$ witch in this case is $\frac {1}{2}$ ... and add to second and u have solution

5. $2x+4y=-2$
$-x+3y=-7$

$\begin{bmatrix}
2 & 4 | & -2 \\
-1 & 3 | & -7
\end{bmatrix}$

2R2 + R1 -> R1
There was a sign error in the array and also in the formula

$\begin{bmatrix}
0 & 10 | & -16 \\
-1 & 3 | & -7
\end{bmatrix}$

3R1 - 10R2 -> R2
You need to cancel the y component in R2

$\begin{bmatrix}
0 & 10 | & -16 \\
10 & 0 | & 22
\end{bmatrix}$

Then you just have to divide

6. Reply to Paymemoney at post # 3: yeKciM essentially DID use Gaussian elimination - but also back substitution. When doing Gaussian elimination, you have one high-level choice to make: do you go all the way to the identity matrix (in the square matrix case), or do you stop when your matrix is upper triangular, and then do back substitution? Numerical analysis suggests that Gaussian elimination with back substitution is the most efficient exact method known for solving a system of equations.

[EDIT]: The back substitution method also has the advantage in being able to work in more cases, such as when the original matrix is not invertible. In that case, you won't be able to get all the way to the identity matrix, and you'll need to use back substitution to find out the parametric dependence for your infinite solution set (unless, of course, your system is inconsistent, in which case all bets are off.)

7. Originally Posted by yeKciM
when u have small sys like this u can :
$2x+4y=-2$
$-x+3y=-7$ this one let's say $\cdot 2$

$2x+4y=-2$
$-2x+6y=-14$

sum them...

$10y=-16 \to y=-1.6$

and when u have $y$ u can get $x$ ...
After going through some example of Gaussian Elimanation i was wrong in saying it wasn't the correct method.

8. Incidentally, this question really belongs in Linear and Abstract Algebra. Or possibly Pre-Algebra and Algebra.

9. Originally Posted by Paymemoney
After going through some example of Gaussian Elimanation i was wrong in saying it wasn't the correct method.
hehehehe.... that isn't Gaussian algorithm because in Gaussian algorithm it's strictly defined how to do elimanation... as I did at #4. That way real sys like when u have thousands of equations.... that is method u'll use... what i did at #2 is just simple elimanation witch can be done like that or express one unknown from one of the equations and put it in another equations... but that u can just use for simple sys like urs...
hence it's ur decision how to eliminate things... and that can be quick way (if u do it right) or...
but using Gaussian algorithm u have correct way every time

10. You did all the same mathematical operations as are required for Gaussian elimination. About the only difference is that you broke out of the matrix notation. There's overlap between elimination and Gaussian elimination.

Incidentally, if you have thousands of equations, you won't use Gaussian elimination, due to round-off error. You'll use some iterative non-exact technique such as Gauss-Seidel or Jacobi iteration, which, believe it or not, will converge to the correct answer faster than if you used Gaussian elimination. It has to do with being a contraction mapping in a Banach space.