Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
What happened to eqn#1?
In your 1st set of equations, you CANNOT add #2 and #3 and also use #3. You have to add eq #2 and #3 and use eq #1.
The solution (for y1, y2, y3) will still be the same, but obviously y3" =/= y3 because y3" = y3 + y2. e.g. if y = 1, and 1 = 1, using your process, y" = y + 1 = 1 + 1. y and y" are obviously different.
Why are you wanting to use Gaussian elimination here? What are you actually trying to "solve"? Each equation can be solved in isolation from all others as there is only one unknown. Or are you just looking for the intersection point?
Now there is the question of numerical stability while doing this task. We are forced to use number crunchers that have limited precision so this introduces some new problems.
[LATER]
A NUMERICAL INVESTIGATION OF THE EFFECT OF MAGNITUDE OF THE PIVOT ON THE RESULT
I was looking at the equations (Set 1):
1.001x+2.001y=3.002
1.002x+2.002y=3.004
and comparing these to the equations with rotated x and y columns (Set 2):
2.001y+1.001x=3.002
2.002y+1.002x=3.004
The idea here is that because the pivot in Set 1 (1.001) is lower than the pivot in Set 2 (2.001) the result of the GE calculated variable in Set 2 will be numerically more stable than the GE calc'd var in Set 1 which means it will be a better approximation.
To check this out using the modern computer however we have to impose a rounding function like:
v=floor(N*v)/N
where v is the result of a calculation. We have to do this to see the effect rounding has on an actual calculation using more digits where it happens automatically within the numeric processor.
With N=1000 we see some interesting results. This limits the precision of the calculations so we end up seeing the effect on the solution set x and y. For Set 1 i was seeing y=0.333 which is not correct at all, off by quite a bit, and for Set 2 i saw x=1 which is correct.
I want to go over this to make sure i did everything right, but you get the general idea. Supposedly we get better results with a larger pivot.
Also written in some literature which i havent investigated fully yet is that the stability also gets better with the introduction of a scaling factor where s=sqrt(Akk) where Akk are the coefficients along the diagonal. What i had found so far was that any introductions of any scaling factor meant that there was yet another multiplication involved (that's what we have to do to all the coefficients first) so the accuracy always seemed to get worse. My only guess at this point was that the scaling factor was introduced when computers could only do fixed point precision. With floating point it actually looks like it gets worse.
I havent looked at tons of matrixes with this in mind, but have looked a quite a few so far and all the results either do not change at all or get worse. So i cant recommend a scaling factor unless you're using fixed point (such as maybe with a microcontroller).