FLINT3.7.0-dev

gr_mat_rank, gr_mat_rank_lu, gr_mat_rank_fflu

Synopsis#include <flint/gr_mat.h>
int gr_mat_rank(slong * rank, const gr_mat_t A, gr_ctx_t ctx)source
int gr_mat_rank_lu(slong * rank, const gr_mat_t A, gr_ctx_t ctx)source
int gr_mat_rank_fflu(slong * rank, const gr_mat_t A, gr_ctx_t ctx)source

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#

Cite this page

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).