"Nasser M. Abbasi" wrote in message <ksjs8b$80g$1@speranza.aioe.org>...
> On 7/22/2013 8:20 AM, El wrote:
> > Hi,
> >
> > I generate a matrix with random elements and it is supposed to be full rank,
>
> If it is a random generated, how would you guarantee this?
>
> >but sometimes the condition number of the matrix is low and I get this warning: system is rank
> >deficient. solution is not unique.
>
> strange, since condition number is better when it is small.
> The closer to one the better, since m=log(cond(A)), and m is
> number of significant digits lost in computing solution of Ax=b.
>
> So the larger the cond(A) the less accuracy one
> expects x to be. May be you meant the inverse of the condition
> number became smaller?
>
> >How can I improve the condition number for this cases?
> >
>
> Well, since it is random matrix, why not try again another random one?
>
> If you do not want to do that, try to add some noise to the same A matrix.
> (which is really the same as making a new random matrix).
>
> By one definition, cond(A)= largest_eigenvalue/smallest_eigenvalue
> (in absolute terms), so to make cond(A) small, you need at best to have
> the matrix have all its eigenvalues be the same.
> These are roots of the matrix char. polynomial. I am not an
> expert on this, and I do not know how to do that in direct way.
> May be others would know.
>
> But for now, try adding some random noise to the matrix, I am sure the
> condition number will change.
>
>
> > Thank you,
> > El
> >
I am also not an expert, so I made a mistake in the previous message, I need a lower condition number. I need to calculate something for large number of different random matrices and then to find the average value, but for some matrix realization I get a warning: system is rank deficient. solution is not unique.
How can I find for which condition number the matrix will be ill conditioned to restrict this behavior?
Thank you a lot,
El
