fmpz_mat_is_singular
#include <flint/fmpz_mat.h>int fmpz_mat_is_singular(const fmpz_mat_t A)sourceReturns 1 if the square matrix A is singular and 0 otherwise. The result is always proven. Throws if A is not square. The empty matrix is nonsingular.
Dimensions up to 4 are decided from the determinant modulo 2^\beta (and the exact determinant if that is zero). Larger matrices are reduced modulo primes of 17 bits: full rank modulo a prime proves nonsingularity. A rank drop is confirmed either by computing the determinant (small matrices) or by an exact kernel vector, obtained by solving the nonsingular pivot block against a non-pivot column; if that fails the prime was unlucky and another one is tried, until the product of the unlucky primes exceeds the Hadamard bound.
Guides#
The FLINT team, “fmpz_mat_is_singular (fmpz_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mat/fmpz_mat_is_singular.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mat-fmpz-mat-is-singular,
author = {{The FLINT team}},
title = {{fmpz\_mat\_is\_singular (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_is_singular.html},
note = {Generated 2026-10-20}
}