[SciPy-user] null space of a matrix

Ryan Krauss ryanfedora at comcast.net
Wed Jun 29 14:31:29 CDT 2005

Thanks Robert.  This works very well.  You seem to always submit high 
quality input to the list.


Robert Kern wrote:

> Ryan Krauss wrote:
>> This is probably a Numeric question, but is there an easy way to find 
>> the null space of a matrix in SciPy?
> The SVD is one way.
> u, s, vh = linalg.svd(A)
> null_mask = (s <= eps)
> null_space = compress(null_mask, vh, axis=0)
> The rows in null_space span the null space of A.

More information about the SciPy-user mailing list