gr_mat_rank, gr_mat_rank_lu, gr_mat_rank_fflu
#include <flint/gr_mat.h>Set rank to the rank of A, by LU decomposition or by fraction-free LU decomposition. gr_mat_rank uses LU over finite fields (and finite rings pretending to be fields), fraction-free LU over other integral domains, which keeps the entries small over \mathbb{Z} and \mathbb{Q}, and returns GR_DOMAIN for rings that are known not to be integral domains, where the rank is not defined here. The lu and fflu versions do not check the ring; any failure of the decomposition (an impossible inverse, an undecidable pivot) is reported with GR_UNABLE.
Guides#
The FLINT team, “gr_mat_rank, gr_mat_rank_lu, gr_mat_rank_fflu (gr_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_mat/gr_mat_rank.html (generated 2026-10-20).
@misc{flint-doc-gr-mat-gr-mat-rank,
author = {{The FLINT team}},
title = {{gr\_mat\_rank, gr\_mat\_rank\_lu, gr\_mat\_rank\_fflu (gr\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_mat/gr_mat_rank.html},
note = {Generated 2026-10-20}
}