"Tato Jandieri" <vjandieri@yahoo.com> wrote in message <gl3g2m$km5$1@fred.mathworks.com>...
> Dear Friends,
> I have a request to you and please, help me to solve to following problem:
>
> I have a homogeneous linear system of equations:
> A*b=0 (where A is a square matrix (10X10), `b` is a vector I would like to calculate (of course, not only trivial solutions) ).
>
> `A` matrix I calculated in Visual Fortan (it is quite a big program). Its determinant is close to zero with the accuracy (10e9). After that I tried Matlab to easily calculate `b` vector with command `null(A)`, but as the determinant is not zero (in my case 10e9 order), I could not calculate vector `b`.
> Please, would you suggest some good idea?
>
> Thank you so much for your help in advance.
> Best regards,
> Tato
First, I'll try to correct a misunderstanding.
A determinant of 1e9 may not even be close to
being a flag for a singular matrix, or it may indeed
be darn close to singularity. This is one of the
problems that students have. They are told by
their teachers and sometimes even their textbooks
that a matrix is singular if the determinant is zero.
In fact, the determinant is a terrible way to do
that computation. It is inefficient and numerically
unstable. I can even give you a 2x2 matrix which
is numerically singular, yet has a determinant fully
as large as 1!
A = [1e9 eps;0 1e9]
A =
1e+09 2.2204e16
0 1e09
See that A has rank 1, so it is numerically singular.
rank(A)
ans =
1
Yet the determinant is 1.
det(A)
ans =
1
I could as easily have constructed a matrix with
determinant that was highly illposed or that was
perfectly conditioned.
Now to solve your problem. If your matrix were
truly singular, then a solution to the homogeneous
problem would be just null(A).
Since it is not even close to numerical singularity,
you might look at the right singular vector that
corresponds to the smallest singular value of A.
John
