Linear Algebra Help

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Ok so we are learning Gauss-Jordan elimination in Linear Algebra (Actually i was supposed to know it 3 weeks ago but i dont). I have been studying the past 2 hours, and i STILL cant execute it. I understand it perfectly in theory but when i go to apply it it doesn't work.

This is a problem i got wrong on the recent quiz. I have the matrix:
{ 8 -8 2 108 }
{-5 -3 4 -6 }
{ 3 6 10 -59 }

Somehow this augmented matrix reduces to:
{ 1 0 0 5 }
{ 0 1 0 -9}
{ 0 0 1 -2}

No matter what i do to get the initial 1 in the [1,1] i get fractions and decimals in the rest of the columns. I spent 30 mins working out each only to find that it didn't work.

Can someone guide me through this problem. I have a feeling that im doing something fundamentally wrong but i cannot find it.

-Kevin
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
The answer to the problem that you gave isn't correct..
Simple way to check, and you can do this EVERY step along the way (if you know the answer):

(I'll just check the top row.)
8 -8 2 -108
if you think of this as an equation, it's
8x -8y +2z = -108

Now, in the reduced matrix, you have
x=5
y=-9
z= 2

plug these values in and you DON'T get -108.

However, given the answer, you should be able to check every row, on every step and be able to find the step where you've made the error.
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Originally posted by: DrPizza
The answer to the problem that you gave isn't correct..
Simple way to check, and you can do this EVERY step along the way (if you know the answer):

(I'll just check the top row.)
8 -8 2 -108
if you think of this as an equation, it's
8x -8y +2z = -108

Now, in the reduced matrix, you have
x=5
y=-9
z= 2

plug these values in and you DON'T get -108.

However, given the answer, you should be able to check every row, on every step and be able to find the step where you've made the error.

Well it is:
X= 5
Y= -9
Z= -2 (Your forgot the negative)

Although i still dont know if it works...let me check.

-Kevin
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Unlike ANY PROBLEMS we were given for practice, and unlike ANY PROBLEMS the teacher demonstrated; you cant reduce a value at [1,1] to 1 without the rest of the values ([1,2] ; [1,3] ; [1,4]) becoming decimals and fractions.

Is there some other way to obtain an initial 1 aside from multiplying by the reciprocal?

-Kevin
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
I forgot how this all works but 2 times the bottom row plus the middle row gets a 1 in the first column.
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Originally posted by: TuxDave
I forgot how this all works but 2 times the bottom row plus the middle row gets a 1 in the first column.


Unfortunately I dont believe that is an option. Thanks anyway though!

-Kevin
 

Johntk5

Banned
Sep 2, 2006
118
0
0
The solution is not correct.

You get +108 for the top row using that solution, not -108.
 

Goosemaster

Lifer
Apr 10, 2001
48,775
3
81
I'll admit that had to check online to refresh sicne it's been a while.

Just get that matrix in the reduced echlelon form which you should know or your book describes...basically 1's in the front, nothing over said 1's, and there you go....

Just plug those numbers as x's, y's , and z's and you'll see whether the solution is lineraly independant etc....



eyah...worst explanation ever:p
 

blustori

Senior member
Mar 2, 2005
753
0
0
there is no way i am doing this problem by hand.

matlab is your friend.
a = [8 -8 2 108;-5 -3 5 -6;3 6 10 -59]
rref(a)

profit.
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Originally posted by: Johntk5
The solution is not correct.

You get +108 for the top row using that solution, not -108.

Wow your right! Well that was the answer it marked as correct. Arg I thought this class was going to be easy...at the time I didn't know it was one of those partial online courses :(

UncleWai, i tried using fractions, but eventually when i got to the end it didn't work. And i cant use a Ti calculator i have to use a basic 4 function calculator, so that took me FOREVER. I worked it out where with the initial one by making each and every row row 1. So that is working it out 3 times; and none of them worked.

Dividing Row 1 by 8 I get fractions and decimals. Dividing row 2 by 5 i get fractions and decimals. Dividing row 3 by 3 I get...fractions and decimals.

This shouldn't be this hard :(

-Kevin
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Originally posted by: Johntk5
You sure you copied down the problem right?

Omg i am so sorry. Upon further inspection it turns out that the value in [1,4] is +108 and not -108.

Any ideas on how i can get the initial one now?

-Kevin
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Originally posted by: Gamingphreek
Originally posted by: DrPizza
The answer to the problem that you gave isn't correct..
Simple way to check, and you can do this EVERY step along the way (if you know the answer):

(I'll just check the top row.)
8 -8 2 -108
if you think of this as an equation, it's
8x -8y +2z = -108

Now, in the reduced matrix, you have
x=5
y=-9
z= 2

plug these values in and you DON'T get -108.

However, given the answer, you should be able to check every row, on every step and be able to find the step where you've made the error.

Well it is:
X= 5
Y= -9
Z= -2 (Your forgot the negative)

Although i still dont know if it works...let me check.

-Kevin

Big deal :p That still didn't make it check.
And, I'd sooner think that you screwed up typing in the original problem than the answer...

I'm going to figure out if there's something *close* that might actually work for that solution...


edit: ok, I see you fixed it as positive 108 :)
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Originally posted by: Soccer55
R1+2*R2+R3 should get you a 1 in the first column of the first row.

-Tom

But i dont think that is a valid operation to obtain a leading one.

-Kevin
 
Nov 3, 2004
10,491
22
81
Originally posted by: Gamingphreek
Originally posted by: Johntk5
The solution is not correct.

You get +108 for the top row using that solution, not -108.

Wow your right! Well that was the answer it marked as correct. Arg I thought this class was going to be easy...at the time I didn't know it was one of those partial online courses :(

UncleWai, i tried using fractions, but eventually when i got to the end it didn't work. And i cant use a Ti calculator i have to use a basic 4 function calculator, so that took me FOREVER. I worked it out where with the initial one by making each and every row row 1. So that is working it out 3 times; and none of them worked.

Dividing Row 1 by 8 I get fractions and decimals. Dividing row 2 by 5 i get fractions and decimals. Dividing row 3 by 3 I get...fractions and decimals.

This shouldn't be this hard :(

-Kevin


well, my class isn't allowed to use calculators. obviously you can still use calculators on hw to expedite the process, but you're not supposed to.
 

Soccer55

Golden Member
Jul 9, 2000
1,660
4
81
Originally posted by: Goosemaster
Originally posted by: Soccer55
R1+2*R2+R3 should get you a 1 in the first column of the first row.

-Tom

what about the rest? :D

Not my homework :p

Actually, I'm working on the rest of it since I can't leave a problem unfinished, but I'm running into fractions. I'm wondering if maybe the OP didn't copy the problem down correctly or something.

-Tom
 

Soccer55

Golden Member
Jul 9, 2000
1,660
4
81
Originally posted by: Gamingphreek
Originally posted by: Soccer55
R1+2*R2+R3 should get you a 1 in the first column of the first row.

-Tom

But i dont think that is a valid operation to obtain a leading one.

-Kevin

Entirely possible.....it's been a while since I've done any linear algebra. But I don't see why you couldn't do it as it's just a linear combination of the rows.

-Tom
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Originally posted by: Soccer55
Originally posted by: Goosemaster
Originally posted by: Soccer55
R1+2*R2+R3 should get you a 1 in the first column of the first row.

-Tom

what about the rest? :D

Not my homework :p

Actually, I'm working on the rest of it since I can't leave a problem unfinished, but I'm running into fractions. I'm wondering if maybe the OP didn't copy the problem down correctly or something.

-Tom

The problem is correctly written down now... I checked the original problem against the answer, and it checks. I did it by hand using fractions, and it worked just fine... I've gotta run out to the barn for a while or I'd take the time to type it all in. You guys are just unfortunate to have grown up with calculators :p Us old-timers who are decent in math can handle fractions without batting an eyebrow :)
 

Gamingphreek

Lifer
Mar 31, 2003
11,679
0
81
Originally posted by: DrPizza
Originally posted by: Soccer55
Originally posted by: Goosemaster
Originally posted by: Soccer55
R1+2*R2+R3 should get you a 1 in the first column of the first row.

-Tom

what about the rest? :D

Not my homework :p

Actually, I'm working on the rest of it since I can't leave a problem unfinished, but I'm running into fractions. I'm wondering if maybe the OP didn't copy the problem down correctly or something.

-Tom

The problem is correctly written down now... I checked the original problem against the answer, and it checks. I did it by hand using fractions, and it worked just fine... I've gotta run out to the barn for a while or I'd take the time to type it all in. You guys are just unfortunate to have grown up with calculators :p Us old-timers who are decent in math can handle fractions without batting an eyebrow :)

So i will have a lot of fractions that will definitely work out?

Ok well that seems to be the toughest one ill have to deal with. I just spent the last 3 hours (That is the longest i have ever studied at one time; my friends will be shocked) and got a 100 on the practice quiz. So im going to go take the regular quiz and ill post back if i got a 100 or not. Thanks a lot for all the help guys.

-Kevin
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
I'm leaving off the brackets... deal with it...
And, I'll only go through the Gaussian:

1, -1, 1/4, 13 1/2
0, -8, 5 1/4, 61 1/2
0, 9, 9 1/4, -99 1/2


1, -1, 1/4, 13 1/2
0, 1, -21/32, -246/32 (I like common denominators)
0, -9, -9 1/4, 99 1/2 (just because I like the signs that way)
Then the 2nd row times 9 plus the 3rd row (hence the negative signs; then I don't have to think)

1, -1, 1/4, 13 1/2
0, 1, -21/32, -246/32
0, 0, 485/32, -970/32

multiply the 3rd row by 32/485

1, -1, 1/4, 13 1/2
0, 1, -21/32, -246/32
0, 0, 1, -2

Here's how you check at any point along the way (since the answer is (5, -9, -2)
I'll check the second row at this point:
0*5 + 1*-9 + -21/32 * -2 =??= -246/32
YESSSSS -7 11/16 = -7 22/32


Read that bolded part!!! Anytime something doesn't work out for you, go back through, step by step until you find a row that doesn't check. (usually, I'll start in the middle of the problem and work backwards or forwards until I find the error.)
Well, that is, if you know the answer.


If you're allowed to use a graphing calculator, it's *very* simple to solve these problems.
(wish I had my calculator with me now so I could double check that I'm typing these in correctly.)

First, let matrix [A] = the coefficient matrix
let matrix = the right hand side (this is a 3x1 matrix)

Then, simply do [A] inverse *

oh crap... or is it matrix B is a horizontal matrix with the right hand side; a 1x3 matrix...
if that's the case, then it's
*[A]inverse (I'm not into thinking about it at the moment; and it's been years since I've done this)

One of these ways, if you do it with the original problem above, your calculator is going to say [5, -9, 2]
(or in a vertical format)

Hopefully that helps!!
 

Johntk5

Banned
Sep 2, 2006
118
0
0
8, -8, 2, 108
-5, -3, 4, -6
3, 6, 10, 59

8, -8, 2, 108
-5, -3, 4, -6
-7, 0, 18, -71

8, -8, 2, 108
8, 0, -13/4, 93/2
-7, 0, 18, -71

8, -8, 2, 108
1, 0, 59/4, -49/2
-7, 0, 18, -71

8, -8, 2, 108
1, 0, 59/4, -49/2
0, 0, 485/4, -485/2

8, -8, 2, 108
1, 0, 59/4, -49/2
0, 0, 1, -2

8, -8, 2, 108
1, 0, 0, 5
0, 0, 1, -2

0, -8, 2. 68
1, 0, 0, 5
0, 0, 1, -2

0, -8, 0, 72
1, 0, 0, 5
0, 0, 1, -2

1, 0 , 0, 5
0, 1, 0, -9
0, 0 , 1, -2
 

Soccer55

Golden Member
Jul 9, 2000
1,660
4
81
Here are the row operations I used:

(1/2)*R1
R1-R3
R2+5*R1
R3-3*R1
(-1/53)*R2
R1+10*R2
R3-36*R2
(53/485)*R3
R2-(41/53)*R3
R1+(67/53)*R3

Yes, there are some ugly fractions there, but it worked.

-Tom

EDIT: Forgot a *