fmpz_mat_nullspace
#include <flint/fmpz_mat.h>slong fmpz_mat_nullspace(fmpz_mat_t res, const fmpz_mat_t mat)sourceSets the first columns of res to a basis of the right nullspace of the matrix mat over , where is the rank, and returns . The other columns of res are set to zero. res must be .
The basis is read off from fmpz_mat_rref: for each non-pivot column the basis vector has in position and the entries of column of the scaled echelon form in the pivot positions. The vectors are integral but in general neither primitive nor a basis of the integer kernel lattice ; for that, compute the Hermite normal form with transformation of or use LLL.
Guides#
The FLINT team, “fmpz_mat_nullspace (fmpz_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mat/fmpz_mat_nullspace.html (generated 2026-11-02).
@misc{flint-doc-fmpz-mat-fmpz-mat-nullspace,
author = {{The FLINT team}},
title = {{fmpz\_mat\_nullspace (fmpz\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mat/fmpz_mat_nullspace.html},
note = {Generated 2026-11-02}
}