FLINT3.7.0-dev

fq_nmod_mat_charpoly

Synopsis#include <flint/fq_nmod_poly.h>
void fq_nmod_mat_charpoly(fq_nmod_poly_t p, const fq_nmod_mat_t M, const fq_nmod_ctx_t ctx)

Sets pp to the characteristic polynomial det⁡(xI−M)\det(xI - M) of the square matrix MM; throws FLINT_ERROR if MM is not square. This is a wrapper of gr_mat_charpoly, which uses the Berkowitz algorithm for n≤12n \le 12 and Danilevsky's algorithm otherwise (for fq_zech, from n=5n = 5); see Characteristic and minimal polynomials.

Generated from the same template as fq_mat_charpoly, whose documentation has the details.

Cite this page

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