Reduced Echelon form is wrong

조회 수: 4 (최근 30일)
Diana Dawoud
Diana Dawoud 2021년 1월 9일
편집: John D'Errico 2021년 1월 9일
As you can see the reduced echelon form is wrong, it should be [1 -4.35; 0 0]

답변 (1개)

John D'Errico
John D'Errico 2021년 1월 9일
편집: John D'Errico 2021년 1월 9일
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.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by