What the hell am I doing? Why is it that if I take a system of equations and perform basic elimination on them, I get a solution? I know that there is some simple concept that is eluding me here. Please help because this is driving me insane. I feel like I am only performing some sort of crazy numerology that somehow works each time.
Linear algebra is basically a system of equations that describe a line on a graph. Take the simple equation: x=y. The line this equation makes would be a diagonal rising to the right. ( x=1, y=1; x=2, y=2 etc.) This is why why it is called “linear”. As long as you plot points for the equation and they come out as a continuous line, then it is linear.
Yes, I know that. What I want to know is why the simple operations I perform on a matrix will result in my getting the solution.
What kind of solutions are you talking about? Systems of ODE’s?
Just basic, basic matircies that you coule solve through Gaussian elimination.
IIRC, the operations you perform merely transform the matrices, they do not add or remove information from them.
It doesn’t technically “remove” or “add” information to the system (the amount of information is based soley on the equations specified at the outset - underspecified or overspecified); rather, GE could be said to “coallesce” the information into a simplified form.
So yes, the operations merely transform the matrices - but into a “useable” form.
The transformations are analogous to algebraic transforms: Do this to the matrix to get the equivalent of doing that to the set of equations. IIRC, it’s really just a simplification, but I could be wrong.
Here’s my advice on learning Linear Algebra: Don’t try to understand why it works, just figure out how it works. Then when you pass the class, throw the book away.
Each line in the augmented matrix correspondes to one of your equations. The transformations just simplify the equations. As you perform a row operation, look at what the result would be to the system of equations. If you have a set of equations, you can swap two of them without changing the system; you can multiply one of the equations by a non-zero number; you can multiply one equation by a number and add it to another. These are the matrix row operations. It just makes the bookkeeping easier if you don’t have to carry the x’s, y’s and z’s around.
My advice is to take a couple of 2x2 or 3x3 sets of equations, and manually solve them, then put them into matrix form and solve them using simple linear algebra transformations. Then think about how you’re doing the same things each time, just doing it as a matrix makes it easier because you can do a couple steps at once, and because it’s easier to see what the next step is.
e.g. 2x+y=10 and 2x-y=2. So if you want to solve this the obvious thing to do is add the two equations together, giving you 4x +0 y = 12. Then x=3, and you plug that back in to get 2*3-y=2 or y=4.
Now transform the matrix:
2 1 10
2 -1 2
to get
1 0 3
0 1 4
if you pay attention, you’ll see you’re doing exactly the same things as you did manually.
Of course it’s easier with the matrix – that’s why you’re going through the bother of learning it.
Actually it would not occur to me to do that. I would solve for either x or y in one of the equations and then substitute for either e or y in the other equation.
I feel really stupid, but I still do not see how performing these eleminations in linear algebra produce an answer.
Well, let’s try a simple example, like the already mentioned:
2x+y=10
2x-y=2
Solve it using a matrix (the letter labeling is to help you see the direct connection with this method and the following method):
2 1 10
2 -1 2 (A)
Divide the first row by 2:
1 1/2 5
2 -1 2 (B)
Add -2*row 1 to row 2:
1 1/2 5
0 -2 -8 ©
Multiply row 2 by -1/2:
1 1/2 5
0 1 4 (D)
Add -1/2 row 2 to row 1:
1 0 3
0 1 4 (E)
And x=3, y=4.
Now do it again, but this time let’s write it in a way so that we can immediately see it in terms of the equations:
2x+y=10
2x-y=2(A)
Divide equation 1 by 2:
x + y/2 = 5
2x - y = 2 (*) (B)
Multiply equation 1 by -2, then add it to equation 2:
-2x - y = -10
2x - y = 2
-2y = -8
Take this new equation and use it to replace equation 2 from the previous step (*):
x + y/2 = 5
-2y = -8 ©
Sidenote: Notice that I haven’t lost any information by “discarding” the equation 2x - y = 2, since this equation is “recoverable” with our current equations:
2*(x + y/2 = 5)
-2y = -8
2x - y = 2
Ending the sidenote and carrying on, multiply both sides of equation 2 by -1/2:
x + y/2 = 5
y = 4(D)
Multiply equation 2 by -1/2, add this to equation 1, and replace equation 1 with this new equation (again, as before, this will not result in the loss of any information, since equation 1 is “recoverable” from the new equations we get):
x + y/2 = 5
-y/2 = -2
x = 3:
x=3
y=4 (E)
Do you see why the second method works? Do you also see the direct connection between the second method and the matrix method?
First off, forget about matrices. That is just a way of doing it faster and should be introduced only after you understand the basic elimination steps. So start with the equations
2x + y = 10
2x - y = 2
What does this mean? You have two numbers, named x and y and twice x plus y is 10 while twice x - y is 2. Since equals subtracted from equals are equal, we can subtract one from the other to get 2y = 8 (-y subtracted from y is 2y) and then y = 4. That gives 2x + 4 = 10 (or 2x - 4 = 2) either of which gives 2x = 6 or x = 3.
This one was simple. Let me try something a bit harder like
2x - y = 12
3x + 2y = 20
There are many ways of dealing with this, but one way is to multiply the first by 3 and second by 2 to get
6x - 3y = 36
6x + 4y = 40
If you now subtract the first from second, you get
- 7y = -4, which gives y = 4/7 and when you substitute this into the first,
2x - 4/7 = 12 or x - 2/7 = 6 or x = 6 + 2/7 = 44/7.
Doing it with matrices just recognizes the fact that the names of the unknowns are irrelevant. And of course, you could have three or more variables.
There is a lot more–a lot lot more–to linear algebra than this.
I remember experiencing a similar bafflement. Add equations? How come I can add equations? We never added equations in elementary school or high school. Now all of a sudden we’re adding equations like it’s a perfectly normal thing to do and nobody ever said why. So I stared at the early examples and scratched my head a lot, and eventually it became obvious.
They’re equations, right? So the two sides are equal to each other! We can do with them whatever we do with equal things! It’s that obvious!
An example of the type of exercise that brought about my enlightenment:
Call both sides of the first equation “a”
x – 2y = 7      a = a
Call both sides of the second equation “b”
3x + y = 5      b = b
multiply both sides of the first equation by -3
-3x + 6y = -21    -3a = -3a
Add the modified first equation to the second equation
-3x + 6y + 3x + y = -21 + 5    -3a + b = -3a + b
Simplify
7y = -16
See?
I remember experiencing a similar bafflement. Add equations? How come I can add equations? We never added equations in elementary school or high school. Now all of a sudden we’re adding equations like it’s a perfectly normal thing to do and nobody ever said why. So I stared at the early examples and scratched my head a lot, and eventually it became obvious.
They’re equations, right? So the two sides are equal to each other! We can do with them whatever we do with equal things! It’s that obvious!
An example of the type of exercise that brought about my enlightenment:
Call both sides of the first equation “a”
x – 2y = 7      a = a
Call both sides of the second equation “b”
3x + y = 5      b = b
multiply both sides of the first equation by -3
-3x + 6y = -21    -3a = -3a
Add the modified first equation to the second equation
-3x + 6y + 3x + y = -21 + 5    -3a + b = -3a + b
Simplify
7y = -16
See?
When you write the augmented matrix for a system of equations, each row of the matrix corresponds to one of the equations.
You’re allowed to interchange rows of the matrix, because it doesn’t matter what order you write the equations in; it’s still the same system.
You can multiply a row of the matrix by a (nonzero) constant, because this is equivalent to multiplying both sides of an equation by the same number (which gives you an equivalent equation).
You can add a multiple of one row to another because you can add the same thing to both sides of an equation and get an equivalent equation. So when you add the equation A = B to the equation C = D, yielding A + C = B + D, the first equation tells you that A and B are the same number, and then you’re adding this same number to both sides of the equation C = D.
So every time you perform any one of these row operations, you’re turning the matrix into one that represents an equivalent system of equations (same solution set).
That’s the idea behind solving a system of equations by Gaussian (or Gauss-Jordan) elimination, which I think is what the OP was asking about. As Hari Seldon said, this is only one part of the great and glorious subject of Linear Algebra.
I still don’t get it. I still don’t see how you are allowed to simply subtract or add one equation from another. Even if I see it work it feels like it should not be allowed, like it is only working by chance.
How can you just add one to the other? 10 doesn’t equal 2, and you don’t know if 2x+y equals 2x-y, how can you just add or subtract them like that, it makes no sense and makes me feel like a big dummy.
Ooop’s, the last post I read was Hari Seldon’s, I will have to get back to you.
You’re looking at it a little backwards here; what’s important is that 2x + y = 10 and 2x - y = 2, not that 10=2 or 2x+y = 2x - y (both of which are false, of course).
Let’s try another simple example, say:
5x + 2y = 13, and
7x - 2y = -5.
Let’s see why adding one equation to another works, using basic algebra:
Start with the first equation
5x + 2y = 13
We know we can add the same thing to both sides, so let’s add 7x - 2y to both sides–nothing wrong with that, is there?
5x + 2y + (7x - 2y) = 13 + (7x - 2y)
And there’s nothing wrong with substitutions, is there? If I have an equation, and I know that a certain expression in that equation is equal to another given expression, I can substitute the new expression for the old expression, in the equation, can’t I? In particular, I know from the second equation that 7x - 2y = -5, so I’ll make that substitution on the right hand side:
5x + 2y + (7x - 2y) = 13 + (-5)
And I’ve just shown that the two given equations can be added together.
Simplifying, of course, gives:
12x = 8
x = 2/3,
so now x pops out of the equations just like that, which shows that adding equations can be useful.