# Gaussian Elimination Method Question?

• Jul 22nd 2010, 09:41 PM
Paymemoney
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:
$\displaystyle 2x+4y=-2$
$\displaystyle -x+3y=-7$

$\displaystyle \begin{bmatrix} 2 & 4 | & -2 \\ -1 & 3 | & 7 \end{bmatrix}$
2R2 - R1 -> R1

$\displaystyle \begin{bmatrix} 2 & 4 | & -2 \\ -1 & 3 | & 7 \end{bmatrix}$
R1 - R2 -> R2

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

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

correct answer is x=2.2 and y=-1.6
P.S
• Jul 22nd 2010, 11:13 PM
yeKciM
when u have small sys like this u can :
$\displaystyle 2x+4y=-2$
$\displaystyle -x+3y=-7$ this one let's say $\displaystyle \cdot 2$

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

sum them...

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

and when u have $\displaystyle y$ u can get $\displaystyle x$ ...
• Jul 22nd 2010, 11:16 PM
Paymemoney
yes, i know you can use that method, but the question asked to use Gaussian Elimination method.
• Jul 22nd 2010, 11:40 PM
yeKciM
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)
$\displaystyle a_{11}x_{1}+a_{12}x_{2}+ . . . +a_{1n}x{n}=b_{1}$
$\displaystyle a_{21}x_{1}+a_{22}x_{2}+ . . . +a_{2n}x{n}=b_{2}$
$\displaystyle a_{31}x_{1}+a_{32}x_{2}+ . . . +a_{3n}x{n}=b_{3}$

$\displaystyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .$

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

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

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

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

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

$\displaystyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .$

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

witch is equivalent to sys No 1 ....
if $\displaystyle k=n$ sys have unique solution.... if $\displaystyle 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 $\displaystyle - \frac {a_{21}}{a_{11}}$ witch in this case is $\displaystyle \frac {1}{2}$ ... and add to second and u have solution
• Jul 23rd 2010, 12:14 AM
AlexisM
$\displaystyle 2x+4y=-2$
$\displaystyle -x+3y=-7$

$\displaystyle \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

$\displaystyle \begin{bmatrix} 0 & 10 | & -16 \\ -1 & 3 | & -7 \end{bmatrix}$
3R1 - 10R2 -> R2
You need to cancel the y component in R2

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

Then you just have to divide
• Jul 23rd 2010, 01:32 AM
Ackbeet
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.)
• Jul 23rd 2010, 02:20 AM
Paymemoney
Quote:

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

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

sum them...

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

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

After going through some example of Gaussian Elimanation i was wrong in saying it wasn't the correct method.
• Jul 23rd 2010, 02:31 AM
Ackbeet
Incidentally, this question really belongs in Linear and Abstract Algebra. Or possibly Pre-Algebra and Algebra.
• Jul 23rd 2010, 02:39 AM
yeKciM
Quote:

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... :D:D:D:D
but using Gaussian algorithm u have correct way every time :D
• Jul 23rd 2010, 02:53 AM
Ackbeet
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.
• Jul 23rd 2010, 06:27 AM
yeKciM