nullspace(A)
finds a basis for the null-space of a matrix A
. The returned vectors have floating-point coordinates. If the matrix A
is an integer-matrix, the basis can be found in integer coordinates.
For example, in Mathematica,
NullSpace[RandomInteger[{-10, 10}, {3, 4}]]
always returns integer vectors.
Is there a way to compute an integer basis for an integer matrix in Julia?
Update: I get build errors with Nemo.jl
(see comments to Dan Getz's answer). In the mean time, is there an alternative?
Nemo.jl is a package for algebra in Julia. It has a lot of functionality and should also allow to compute the null space. One way to go about it would be:
After which
d
is the dimension of the nullspace andbmat
has a basis in its columns.Hope this helps (I would be happy to see alternative solutions possibly using other algebra packages).