fmpz_mod_mat_inv
Synopsis
#include <flint/fmpz_mod_mat.h>int fmpz_mod_mat_inv(fmpz_mod_mat_t B, const fmpz_mod_mat_t A, const fmpz_mod_ctx_t ctx)sourceSets B = A^{-1} and returns 1 if the square matrix A is invertible; otherwise returns 0 and leaves B undefined. A and B must have the same dimensions. The inverse is computed by solving AB = I with fmpz_mod_mat_solve; a 1 \times 1 matrix is inverted with fmpz_mod_inv, which throws an exception for a nonzero non-unit.
Guides#
Cite this page
The FLINT team, “fmpz_mod_mat_inv (fmpz_mod_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mod_mat/fmpz_mod_mat_inv.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mod-mat-fmpz-mod-mat-inv,
author = {{The FLINT team}},
title = {{fmpz\_mod\_mat\_inv (fmpz\_mod\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mod_mat/fmpz_mod_mat_inv.html},
note = {Generated 2026-10-20}
}