Reduced Echelon form is wrong
3 views (last 30 days)
Show older comments

As you can see the reduced echelon form is wrong, it should be [1 -4.35; 0 0]
0 Comments
Answers (1)
John D'Errico
on 9 Jan 2021
Edited: John D'Errico
on 9 Jan 2021
A = [-2 2;-.4 .2];
[V,D] = eig(A)
V =
-0.974588432346814 -0.754384720454159
-0.224003097156669 -0.656432550644239
D =
-1.54031242374329 0
0 -0.259687576256715
B = A - D(1,1)*eye(2)
B =
-0.459687576256715 2
-0.4 1.74031242374329
Now, B is a rank 1 matrix. We can approximate the matrix quite well as an outer product of two vectors, as we can see here:
rank(B)
ans =
1
[U,S,V ] = svd(B)
norm(U(:,1)*S(1,1)*V(:,1)' - B)
ans =
1.90253315901036e-15
That rref seems to miss this is just an issue of tolerances.
[R,jb] = rref(A - D(1,1)*eye(2))
R =
1 0
0 1
jb =
1 2
However, if we increase the tolerance by a little beyond the default applied in rref, we see:
[R,jb] = rref(A - D(1,1)*eye(2),1e-14)
R =
1 -4.35078105935822
0 0
jb =
1
Now rref is able to agree with the finding of the other tools.
Remember that all numerical computations are subject to trash in the least significant bits, and that you need to use tolerances properly and carefully to resolve any problem. Understanding the computations done is a huge part of resolving those problems.
0 Comments
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!