fmpq_mat_charpoly, _fmpq_mat_charpoly
Synopsis
#include <flint/fmpq_mat.h>void fmpq_mat_charpoly(fmpq_poly_t pol, const fmpq_mat_t mat)sourcevoid _fmpq_mat_charpoly(fmpz * coeffs, fmpz_t den, const fmpq_mat_t mat)sourceSets pol to the characteristic polynomial of the square matrix mat; the underscore version writes the coefficients of the numerator to coeffs and the denominator to den, not necessarily in canonical form. Throws if mat is not square.
With the least common denominator of the entries, the characteristic polynomial of the integer matrix is computed with _fmpz_mat_charpoly, and , so the coefficient of is .
Cite this page
The FLINT team, “fmpq_mat_charpoly, _fmpq_mat_charpoly (fmpq_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq_mat/fmpq_mat_charpoly.html (generated 2026-11-02).
@misc{flint-doc-fmpq-mat-fmpq-mat-charpoly,
author = {{The FLINT team}},
title = {{fmpq\_mat\_charpoly, \_fmpq\_mat\_charpoly (fmpq\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpq_mat/fmpq_mat_charpoly.html},
note = {Generated 2026-11-02}
}