Math question: solve the system of equations

BigToque

Lifer
Oct 10, 1999
11,700
0
76
I'm trying to help a friend out with her math assignment that she's having trouble with. It's been about 6 years since I've taken a math class that deals with this, so I'm a little unsure of my stuff.

The equations I'm given in one problem are these and asked to solve the system using the augmented matrix method.

2x + y - z = 1
x + 2y + z = 8
3x - y + z = 4

I've played around with this and can't help but feel that there is no solution to this problem. Obviously I may just be doing my math wrong as well...

I've reduced it to:

1, 2, 1, 8
0, 1, 1, 5
0, -7, -2, -20

but don't know where to go from here.
 

Heisenberg

Lifer
Dec 21, 2001
10,621
1
0
I'm not sure how you got your numbers. The matrix should just be
[2 1 -1 1
1 2 1 8
3 -1 1 4]

Then just put it into reduced for echelon form. That will tell if it's solvable or not.
 

pray4mojo

Diamond Member
Mar 8, 2003
3,647
0
0
From MATLAB:
>> A = [2 1 -1; 1 2 1; 3 -1 1]

A =

2 1 -1
1 2 1
3 -1 1

>> b = [1;8;4]

b =

1
8
4

>> x=A\b

x =

1
2
3

 

BigToque

Lifer
Oct 10, 1999
11,700
0
76
Originally posted by: Heisenberg
I'm not sure how you got your numbers. The matrix should just be
[2 1 -1 1
1 2 1 8
3 -1 1 4]

Then just put it into reduced for echelon form. That will tell if it's solvable or not.
I started out with the matrix that you have, then got to what I have with the following operations:

Swap R1 and R2 (get my 1 in (1,1))
then
Multiply R1 by -2 and add to R2, Multiply R1 by -3 and add to R3 (get 0's below the 1 in the first column)
then
Multiply R2 by -1/3 (get 1 in (2,2))

leaving me with:

1, 2, 1, 8
0, 1, 1, 5
0, -7, -2, -20
 

homercles337

Diamond Member
Dec 29, 2004
6,340
3
71
Originally posted by: pray4mojo
From MATLAB:
>> A = [2 1 -1; 1 2 1; 3 -1 1]

A =

2 1 -1
1 2 1
3 -1 1

>> b = [1;8;4]

b =

1
8
4

>> x=A\b

x =

1
2
3

Care to show your work. The excellent left divide matlab operator is not going to cut it for homework. Unless its matlab homework :p

BTW, i use the left divide operator for least squares solutions to systems daily. :D
 

Heisenberg

Lifer
Dec 21, 2001
10,621
1
0
Originally posted by: BigToque
Originally posted by: Heisenberg
I'm not sure how you got your numbers. The matrix should just be
[2 1 -1 1
1 2 1 8
3 -1 1 4]

Then just put it into reduced for echelon form. That will tell if it's solvable or not.
I started out with the matrix that you have, then got to what I have with the following operations:

Swap R1 and R2 (get my 1 in (1,1))
then
Multiply R1 by -2 and add to R2, Multiply R1 by -3 and add to R3 (get 0's below the 1 in the first column)
then
Multiply R2 by -1/3 (get 1 in (2,2))

leaving me with:

1, 2, 1, 8
0, 1, 1, 5
0, -7, -2, -20
Well your method is right so far, but I didn't check it for arithmetic errors. Doing with a calc gives
[1 0 0 1
0 1 0 2
0 0 1 3]

which is what the guy above got with Matlab.
 

JayHu

Senior member
Mar 19, 2001
412
0
0
Originally posted by: BigToque
Originally posted by: Heisenberg
I'm not sure how you got your numbers. The matrix should just be
[2 1 -1 1
1 2 1 8
3 -1 1 4]

Then just put it into reduced for echelon form. That will tell if it's solvable or not.
I started out with the matrix that you have, then got to what I have with the following operations:

Swap R1 and R2 (get my 1 in (1,1))
then
Multiply R1 by -2 and add to R2, Multiply R1 by -3 and add to R3 (get 0's below the 1 in the first column)
then
Multiply R2 by -1/3 (get 1 in (2,2))

leaving me with:

1, 2, 1, 8
0, 1, 1, 5
0, -7, -2, -20

I didn't check your math
But keep going.
use the 1 in the 2,2 position to zero out the 1,2 and 3,2