# Solving A*x=b when A is full rank but numerically rank deficient Classic List Threaded 6 messages Open this post in threaded view
|

## Solving A*x=b when A is full rank but numerically rank deficient

 Hello, I have to solve a problem implying number of molecules in various states. The issue is the the smallest number is around 10^4 and the biggest 10^34. And the interesting phenomena occur with the smallest fraction. Here is a pseudo-problem generation: # generate a symmetric non-singular matrix A=randn(5,5); A=A.'*A;  AA=A*kron(logspace(34, 4, 5), ones(5,1)); X=rand(5,1); B=AA*X; [AA\B X] The solution clearly originates from a minimum-norm solver: only one component of X is OK. The main issue is that A singular values span the original range of 10^4 to 10^34. Any idea on how to solve this kind of problem overcoming the numerical resolution issue ? Regards Pascal
Open this post in threaded view
|

## Re: Solving A*x=b when A is full rank but numerically rank deficient

Open this post in threaded view
|

## Re: Solving A*x=b when A is full rank but numerically rank deficient

 Sorry to contradict you. I went one step further: A=randn(5,5); A=A.'*A; AA=A*kron(logspace(34, 4, 5), ones(5,1)); AAmp = AA+mp(0); X=rand(5,1); B=AA*X;Bmp=AAmp*X; AAinv=inv(AAmp.'*AAmp); double([AA\B AAinv*(AAmp.'*Bmp) X]) ans =    9.4146e-02   9.4146e-02   9.4146e-02    2.9772e-09   7.1297e-01   7.1297e-01    9.4146e-17   7.0114e-01   7.0114e-01    2.9772e-24   1.5793e-01   1.5793e-01    9.4146e-32   9.4513e-01   9.4513e-01 As you may notice, ALL the solutions are correctly computed in the second case. 'mp' is a class I'm busy working on, implementing multi-precision arithmetic. I have to explicitelly invert the design matrix, as the left division operator still has some issues. Regards Pascal
Open this post in threaded view
|

## Re: Solving A*x=b when A is full rank but numerically rank deficient

 In reply to this post by CdeMills CONTENTS DELETED The author has deleted this message.