LU solve for matrix with zeros on diagonal

  • #1
nawidgc
25
0
Is it possible to obtain a solution of the linear system Ax = b with LU decomposition when A contains zeros on its diagonal? I am trying to obtain a solution with LU decomposition and then perform a forward/backward substitution but I get NaN entries in the solution vector x. The condition number of my matrix is 10^8. Appreciate any help/comments.
 

Answers and Replies

  • #2
HallsofIvy
Science Advisor
Homework Helper
43,021
970
If the matrix has 0s on the diagonal, you can get rid of those by swapping rows. Since that is a "row operation" it should not give you any trouble with finding the LU decomposition.
 
  • #3
SteamKing
Staff Emeritus
Science Advisor
Homework Helper
12,809
1,670
Is it possible to obtain a solution of the linear system Ax = b with LU decomposition when A contains zeros on its diagonal? I am trying to obtain a solution with LU decomposition and then perform a forward/backward substitution but I get NaN entries in the solution vector x. The condition number of my matrix is 10^8. Appreciate any help/comments.

I would be concerned trying to use LU decomp on a matrix with such a high condition number, regardless of whether there are zeroes on the main diagonal. A high condition number means that the solutions obtained from the LU decomp are subject to round-off error during their calculation, so much so that these solutions may be meaningless.

Instead of plain vanilla LU decomp, perhaps you should apply some other techniques to the matrix as well, to check your original solutions. I would recommend you try the singular value decomposition.

http://en.wikipedia.org/wiki/Condition_number

http://en.wikipedia.org/wiki/Singular_value
 

Suggested for: LU solve for matrix with zeros on diagonal

Replies
3
Views
457
Replies
4
Views
602
  • Last Post
Replies
5
Views
627
Replies
1
Views
344
Replies
7
Views
289
Replies
1
Views
104
Replies
6
Views
1K
  • Last Post
Replies
10
Views
525
Replies
5
Views
909
  • Last Post
Replies
2
Views
827
Top