# System of Linear Equations to Reduced Echelon Form

1. Aug 8, 2015

### mattyk

I have
x1 + 3x2 - x3 = b1
x1 - x2 + 3x3 = b1
-2x1 - 5x2 - x3 = b1

So using an augmented matrix I get this

[1 3 -1 | 1]
[1 -1 3 | 1]
[-2 -5 1 | 1]

[1 3 -1 | 1]
[0 -4 4 | 0] R2 - R1 = R2
[0 1 -1 | 3] R3 + 2R1 = R3

[1 3 -1 | 1]
[0 1 -1 | 3] Swap R2 with R3
[0 -4 4 | 0]

[1 0 2 | -8] R1 - 3R2 = R1
[0 1 -1 | 3]
[0 0 0 | 12] R3 + 4R2 = R3

Now my problem is the third row
I don't know how to use this to answer this part of the question
"Use part b) to write an equation that expresses conditions on b1, b2 and b3 so that the system
will be consistent."

Have I reduced it correctly? Is there another way to reduce it?
If not how do I answer that part of the question?

2. Aug 9, 2015

### HallsofIvy

Staff Emeritus
Your very first step- writing the augmented matrix- is wrong because you have replaced b1, b2, and b3 with "1", losing the entire point of the problem!
$$\begin{bmatrix} 1 & 0 & 2 & | & -b_1- 3b_3 \\ 0 & 1 & -1 & | & b_3+ 2b_1 \\ 0 & 0 & 0 & | & b_2+ 4b_3+ 7b_1 \end{bmatrix}$$

Those now correspond to the equations
$x_1+ 2x_3= -b_1-3b_3$
$x_2- x_3= b_3+ 2b_1$
$0= b_2+ 4b_3+ 7b_1$

In order that these be "consistent", in other words, that there be values of $x_1$, $x_2$, and $x_3$ so that these equations are true, the third equation, which has no $x_1$, $x_2$, or $x_3$ must be true- we must have $b_2+ 4b_3+ 7b_1= 0$.[/sub]

3. Aug 9, 2015

### mattyk

I've written the question down wrong. A copy and paste error. Sorry about that.
It should be

x1 + 3x2 - x3 = b1
x1 - x2 + 3x3 = b2
-2x1 - 5x2 - x3 = b3

I'm assuming that changes things.

Last edited: Aug 9, 2015
4. Aug 9, 2015

### mattyk

Or not.
I think I get it now. I replied at 2am whilst trying to feed a 1 year old.

5. Aug 9, 2015

### FactChecker

Aside from the errors already pointed out, you were doing it right. Your original version led to a problem that is not unusual. The equations were inconsistent and there was no feasible solution. That is apparent after your first step. Row 2 showed that x2 = x3, but row 3 contradicted that. Things like that can easily happen in real problems and it is good if you can recognize when it happens.

6. Aug 9, 2015

### mattyk

I've had another go with what @HallsofIvy has posted.

[1 3 -1 | b1 ]
[1 -1 3 | b2 ]
[-2 -5 1 | b3 ]

[1 3 -1 | b1 ]
[0 -4 4 | b2 - b1 ] R2 - R1 = R2
[0 1 -1 | b3 + 2b1 ] R3 + 2R1

[1 3 -1 | b1 ]
[0 1 -1 | b3 + 2b1 ] Swap R2 & R3
[0 -4 4 | b2 - b1 ]

[1 0 2 | b1 - 3(b3 + 2b1) ] R1 - 3R3
[0 1 -1 | b3 + 2b1 ]
[0 0 0 | (b2 - b1) + 4(b3 + 2b1) ] R3 + 4R2

[1 0 2 | 7b1 - 3b3 ]
[0 1 -1 | b3 + 2b1 ]
[0 0 0 | 7b1 + b2 + 43

x1 + 2x3 = 7b1 - 3b2
x2 - x3 = 2b1 + b3
0 = 7b1 + b2 + 4b3

So my first equation is different to Hallsofivy.
Have I messed up somewhere?

Last edited: Aug 9, 2015
7. Aug 9, 2015

### FactChecker

Double check your calculations. For instance, I see b1 - 3(b3 + 2b1) = 7b1 - 3b3. Should be -5b1-3b3.

8. Aug 9, 2015

### mattyk

Dang it. I looked at that so many times.

So changed I get

x1 + 2x3 = -5b1 - 3b2
x2 - x3 = 2b1 + b3
0 = 7b1 + b2 + 4b3

Last edited: Aug 9, 2015
9. Aug 10, 2015

### FactChecker

You can make a test case to verify each step. Set x1 = x2 = x3 = 1. The original equations in Post #3 give b1=3, b2=3; b3= -8. Those should work in any equation you get along the way in your solution. If they don't, check that equation. I see that you have a wrong entry in (3,3) at the beginning of Post #6. You have [-2 -5 1 | b3 ] but it should be [-2 -5 -1 | b3 ].

One of the disciplines that math requires is to check every sign and symbol step-by-step. It is very difficult, especially in large problems. That is why symbolic manipulation programs like MAPLE are so valuable.

10. Aug 11, 2015

### mattyk

I wrote the original equation down wrong. it should be -2x1 - 5x2 + x3 = b1.