0

Given the following matrix:

>> A = [3 3 0; 4 4 5; 0 0 1]
A =

     3     3     0
     4     4     5
     0     0     1

The rotation matrix would look something like this:

>> G = [3/5 4/5 0; -4/5 3/5 0; 0 0 1]
G =

    0.6000    0.8000         0
   -0.8000    0.6000         0
         0         0    1.0000

When applying Givens rotation to transform A into an upper triangular matrix (A = G*A), it will make A(2,1) null, however it will makes A(2,2) null as well, which is bad when trying to solve Ax = b with the Upper Triangular System algorithm, because of the 0 division.

Imagine the matrix in question something like 1000x1000. How would you curve around this problem?

Yes, this is homework, however this is by far not my task. It's also for my general knowledge and interest. Nevertheless, I am not allowed to use any Matlab implemented functions.

  • 1
    The reason you have a problem here is that $A$ is singular. If $A$ is non-singular, you won't run into this problem. – Ben Grossmann Apr 03 '14 at 19:51
  • @Omnomnomnom Yes, that's true. I am going to go for a modified Gaussian elimination with partial pivoting. Answer the question with that so I can accept the answer. – Dragos Rizescu Apr 03 '14 at 20:28

1 Answers1

1

The reason you have a problem here is that A is singular. If A is well-conditioned (i.e. not "close" to a singular matrix), you won't run into this problem.

Ben Grossmann
  • 225,327