fmpz_mod_mat_mul, fmpz_mod_mat_sqr
Synopsis
#include <flint/fmpz_mod_mat.h>void fmpz_mod_mat_mul(fmpz_mod_mat_t C, const fmpz_mod_mat_t A, const fmpz_mod_mat_t B, const fmpz_mod_ctx_t ctx)sourcevoid fmpz_mod_mat_sqr(fmpz_mod_mat_t B, const fmpz_mod_mat_t A, const fmpz_mod_ctx_t ctx)sourceSet C = AB, respectively B = A^2 for square A. The number of columns of A must equal the number of rows of B.
The exact integer product is computed with fmpz_mat_mul (respectively fmpz_mat_sqr), which chooses between classical, Strassen, multimodular and BLAS-based algorithms and is multithreaded, and each entry is then reduced modulo n (Multiplying matrices over Z/nZ).
Guides#
Cite this page
The FLINT team, “fmpz_mod_mat_mul, fmpz_mod_mat_sqr (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_mul.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mod-mat-fmpz-mod-mat-mul,
author = {{The FLINT team}},
title = {{fmpz\_mod\_mat\_mul, fmpz\_mod\_mat\_sqr (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_mul.html},
note = {Generated 2026-10-20}
}