Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Computing the null space of a matrix as fast as possible

Tags:

I need to compute the nullspace of several thousand small matrices (8x9, not 4x3 as I wrote previously) in parallel (CUDA). All references point to SVD but the algorithm in numerical recipes seems very expensive, and gives me lots of things other than the null space that I don't really need. Is Gaussian elimination really not an option? Are there any other commonly used methods?

like image 461
zenna Avatar asked Feb 02 '10 01:02

zenna


People also ask

What is the easiest way to find the null space of a matrix?

To find the null space of a matrix, reduce it to echelon form as described earlier. To refresh your memory, the first nonzero elements in the rows of the echelon form are the pivots. Solve the homogeneous system by back substitution as also described earlier. To refresh your memory, you solve for the pivot variables.

What is a null space in matrix?

Definition. The nullspace of the matrix A, denoted N(A), is the set of all n-dimensional column vectors x such that Ax = 0.


1 Answers

To answer your question directly... yes! QR decomposition!

Let A be an m-by-n matrix with rank n. QR decomposition finds orthonormal m-by-m matrix Q and upper triangular m-by-n matrix R such that A = QR. If we define Q = [Q1 Q2], where Q1 is m-by-n and Q2 is m-by-(m-n), then the columns of Q2 form the null space of A^T.

QR decomposition is computed either by Gram-Schmidt, Givens rotations, or Householder reflections. They have different stability properties and operation counts.

You are right: SVD is expensive! I can't speak for what state-of-the-art stuff uses, but when I hear "compute null space" (EDIT: in a way that is simple for me to understand), I think QR.

like image 161
Steve Tjoa Avatar answered Oct 02 '22 19:10

Steve Tjoa