FLINT3.7.0-dev

fmpq_mat_minpoly, _fmpq_mat_minpoly

Synopsis#include <flint/fmpq_mat.h>
void fmpq_mat_minpoly(fmpq_poly_t pol, const fmpq_mat_t mat)source
slong _fmpq_mat_minpoly(fmpz * coeffs, fmpz_t den, const fmpq_mat_t mat)source

Sets pol to the minimal polynomial of the square matrix mat; the underscore version writes the coefficients of the numerator to coeffs (space for n + 1 of them) and the denominator to den, and returns the length. The minimal polynomial is computed like the characteristic polynomial, from that of the integer matrix qA with _fmpz_mat_minpoly. Throws if mat is not square.

Cite this page

The FLINT team, “fmpq_mat_minpoly, _fmpq_mat_minpoly (fmpq_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq_mat/fmpq_mat_minpoly.html (generated 2026-10-20).