FLINT3.7.0-dev

gr_mat_nullspace, gr_mat_nullspace_no_resize

Synopsis#include <flint/gr_mat.h>
int gr_mat_nullspace(gr_mat_t X, const gr_mat_t A, gr_ctx_t ctx)source
int gr_mat_nullspace_no_resize(slong * nullity, gr_mat_t X, const gr_mat_t A, gr_ctx_t ctx)source

Set the columns of X to a basis of the right nullspace \{x : Ax = 0\} of the m \times n matrix A, read off from the reduced row echelon form: one basis vector per non-pivot column. gr_mat_nullspace resizes X to n rows and as many columns as the nullity; the no_resize version requires X with n rows and at least that many columns, zero-pads the rest and writes the nullity to nullity.

The basis is not canonical. Over an integral domain that is not a field the basis is computed from gr_mat_rref_den and has entries in the ring; it is a basis over the fraction field. Over other rings the result may be meaningless.

Guides#

Cite this page

The FLINT team, “gr_mat_nullspace, gr_mat_nullspace_no_resize (gr_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_mat/gr_mat_nullspace.html (generated 2026-10-20).