# Best generic method to solve homogeneous system

What is the best way to solve the homogeneous system A\vec{x}=\vec{0} for either a dense or sparse array (or even GPU array)?

For dense A, nullspace(A) works, and for a sparse array, eigs(A,nev=1,which=:SM) appears to work fine.

Is there a better, generic, method somewhere? I looked at IterativeSolvers with b=\vec{0}, but that doesn’t seem to return the right answer.

Note that until now, I had been using NLsolve, but that seems quite wasteful considering that the lu factorization is needlessly recomputed at each step.

One simple answer is to compete and store the lu factorization.

With NLsolve? How would that work?