singular matrix

Chetan Jhurani chetan at
Thu Apr 16 11:34:32 CDT 2009

> From: Yixun Liu
> Hi,
> For Ax=b, A is mxn, m>n. I use CG to resolve it and find the solution
> makes no sense.  I guess rank(A) < min(m,n). How to resolve this
> singular system? Use SVD?

Only a square matrix can be singular.

If reinterpreting as a least-squares problem, SVD would be slower.

If rank(A) = n, see

If A is dense, use LAPACK for QR, otherwise sparse QR factorization
should be faster.

If A is not full rank (rank(A) < n), it is more complicated.  The
pseudoinverse does not have a simple formula, although it is still
computable for getting the minimum norm solution.  The book by Ake
Bjorck would be useful, as Matt already suggested.


> Best,
> Yixun

More information about the petsc-users mailing list