Solving $Ax = B$ when $A$ has a large condition number.

There's two parts to this problem the first is implementation related the second is theoretical.

Part 1: I've been given $A$ & $B$ and need to solve for $x$. To do this I've been using an SVD. The problem is when $A$ has a large condition number the SVD loses enough precision that returned matrix becomes useless (filled with nan values).

The condition number is quotient of the absolute value of largest and smallest eigenvalues. Part of the reason the condition number is so large is the min value is on the order of $10^{-19}$. I used the Jacobi method to calculate the eigenvalues of $A$.

Both the SVD & Jacobi implementations come from Numerical Recipes in C 3rd ed.

I've heard that you can threshold the SVD to ignore such small values but can't find reference to it in the NR and LAPACK implementations or on papers on SVD implementation. Am I missing something does this not exist?

Part 2: What other methods are used to solve $Ax = B$?

Thanks, Jon

-
– user2468 Apr 21 '12 at 22:13
"...but can't find reference to it in the NR and LAPACK implementations or on papers on SVD implementation." - if memory serves, it's specifically said there to zero out "tiny" singular values, and then perform pseudoinversion with the diagonal factor (reciprocate if nonzero, do nothing otherwise). If you're looking at NR, did you read the comments in the code? – J. M. Apr 22 '12 at 0:27
Also: often, if you end up dealing with an ill-conditioned matrix, it often turns out that you're solving the wrong problem to begin with. Where did your matrices come from? – J. M. Apr 22 '12 at 0:28