FLINT3.7.0-dev

fmpz_mat_is_singular

Synopsis#include <flint/fmpz_mat.h>
int fmpz_mat_is_singular(const fmpz_mat_t A)source

Returns 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#

Cite this page

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