by Julien Langou » Sun Feb 19, 2006 1:46 pm
Hello,
I assume your matrix is nonsingular (i.e. full rank)? and there is no symmetry in it? (This will not make much difference however.)
If A is nonsingular and you want to solve Ax=b with b=0 with DGESV (or DGESVX) then there is a unique solution, it is the trivial solution x=0 and there is nothing to do about it. This is the answer given by DGESV (or DGESVX). Trivial solution for trivial problem. You will have the same answer (x=0) using Linear Least Squares (LLS) routines (e.g. DGELS).
If you want some help, you need to specify your problem more specifically and I can not figure which problem you want to solve.
So from what you wrote, I'd say you want to solve the problem:
(*) min_{|| x ||_2=1} { || A x ||_2 }
Is it what you want to solve?
The residual of Ax=b when be b=0 is ||Ax|| right?
That's what you are calling error?
If your only constraint on the norm of x is 'x is different from 0' then your problem is not well posed since for any solution x, 1/10.x has 1/10 smaller ||Ax||.
So in general you impose ||x||_2=1.
Then the problem (*) is the problem of finding the minimum singular vector of the matrix A. Then we can help. For example you can use DGESVD or some other routines. Just confirm this is your problem. Also how large n is going to be?
Julien