NullSpace
function gives a list of vectors that forms a basis for the null space of the input matrix.
When the rank of the input argument matrix $M_{m\times n}$ is exactly $n-1$, then the null space becomes the only non-zero null vector $Z$ of $M$ such that: $M\cdot Z=0$, which can also be obtained by singular value decomposition of $M$.
But by comparing the time consumption of SingularValueDecomposition
and NullSpace
, the latter is usually much faster, this indicates they are using different algorithms.
Then: what is the algorithm used by NullSpace
function? It seems there is no clue here.
NullSpace
will use some manner of Gaussian elimination and that will be faster than (exact) SVD. Absent some indication of matrix type and size though everything is just speculation. $\endgroup$OneStepRowReduction
for this. (Except...sometimesDivisionFreeRowReduction
performs better. Heuristics for this choice are not so easy to come by.) $\endgroup$Automatic
will select. But if you want to force one or the other method then by all means set that option explicitly. $\endgroup$