Talk:Reduced row echelon form: Difference between revisions

no edit summary
m (moved critique of... something? from main page)
No edit summary
Line 1:
=="Break" vs. "return" bug==
 
The algorithm has a Bug.
It does NOT do the SWAP. No conditions are checked
 
It does NOT work for this example matric
 
Solve the following system of equations.
3x+y− 4z=−1
x +10z= 5
4x+y+ 6z= 1
Solution. The corresponding augmented matrix is
3 1 −4 −1
1 0 10 5
4 1 6 1
Create the first leading one by interchanging rows 1 and 2
1 0 10 5
3 1 −4 −1
4 1 6 1
Now subtract 3 times row 1 from row 2, and subtract 4 times row 1 from row 3. The result is
1 0 10 5
0 1 −34 −16
0 1 −34 −19
Now subtract row 2 from row 3 to obtain
1 0 10 5
0 1 −34 −16
0 0 0 −3
This means that the following reduced system of equations
x +10z= 5
y−34z=−16
0= −3
 
is equivalent to the original system. In other words, the two have the same solutions. But this last
system clearly has no solution (the last equation requires that x, y and z satisfy 0x+0y+0z = −3,
and no such numbers exist). Hence the original system has no solution.
 
 
 
=="Break" vs. "return" bug==
The original author of the Python example mistakenly translated the keyword <code>stop</code> that appears in the [http://en.wikipedia.org/wiki/Row_echelon_form#Pseudocode Wikipedia pseudocode] as <code>break</code> rather than the correct <code>return</code>. This created a control-flow bug that didn't manifest itself when the program was run on the example matrix given in the task description, but did cause an exception if the program was run on, e.g.,
<pre>
36

edits