FLINT3.7.0-dev

fmpq_mat_mul, fmpq_mat_mul_cleared, fmpq_mat_mul_direct

Synopsis#include <flint/fmpq_mat.h>
void fmpq_mat_mul(fmpq_mat_t C, const fmpq_mat_t A, const fmpq_mat_t B)source
void fmpq_mat_mul_cleared(fmpq_mat_t C, const fmpq_mat_t A, const fmpq_mat_t B)source
void fmpq_mat_mul_direct(fmpq_mat_t C, const fmpq_mat_t A, const fmpq_mat_t B)source

Sets C=ABC = AB. fmpq_mat_mul calls fmpq_mat_mul_cleared, which clears denominators of the rows of AA and of the columns of BB, multiplies the integer matrices with fmpz_mat_mul and divides entry (i,j)(i, j) by the product of the ii-th row and jj-th column denominators. fmpq_mat_mul_direct computes the dot products in rational arithmetic and throws if CC is AA or BB. fmpq_mat_mul and fmpq_mat_mul_cleared allow aliasing.

Cite this page

The FLINT team, “fmpq_mat_mul, fmpq_mat_mul_cleared, fmpq_mat_mul_direct (fmpq_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq_mat/fmpq_mat_mul.html (generated 2026-11-02).