FLINT3.7.0-dev

_gr_mat_charpoly_danilevsky_inplace, _gr_mat_charpoly_danilevsky, gr_mat_charpoly_danilevsky, _gr_mat_charpoly_gauss, gr_mat_charpoly_gauss, _gr_mat_charpoly_householder, gr_mat_charpoly_householder

Synopsis#include <flint/gr_mat.h>
int _gr_mat_charpoly_danilevsky_inplace(gr_ptr res, gr_mat_t mat, gr_ctx_t ctx)source
int _gr_mat_charpoly_danilevsky(gr_ptr res, const gr_mat_t mat, gr_ctx_t ctx)source
int gr_mat_charpoly_danilevsky(gr_poly_t res, const gr_mat_t mat, gr_ctx_t ctx)source
int _gr_mat_charpoly_gauss(gr_ptr res, const gr_mat_t mat, gr_ctx_t ctx)source
int gr_mat_charpoly_gauss(gr_poly_t res, const gr_mat_t mat, gr_ctx_t ctx)source
int _gr_mat_charpoly_householder(gr_ptr res, const gr_mat_t mat, gr_ctx_t ctx)source
int gr_mat_charpoly_householder(gr_poly_t res, const gr_mat_t mat, gr_ctx_t ctx)source

The characteristic polynomial with O(n^3) operations, by Danilevsky's reduction to a block companion (Frobenius) form [Dan1937], or by reduction to Hessenberg form with Gaussian elimination or with Householder reflections followed by gr_mat_charpoly_from_hessenberg. The inplace version overwrites its input.

These algorithms divide and test for zero, so they need a field; the Householder version also needs square roots and complex conjugation. They return GR_DOMAIN or GR_UNABLE when a division or square root is impossible or a zero test cannot be decided.

References#

  • [Dan1937] A. M. Danilevsky, "On the numerical solution of the secular equation" (in Russian), Matematicheskii Sbornik 2(44):1 (1937), 169-171
Cite this page

The FLINT team, “_gr_mat_charpoly_danilevsky_inplace, _gr_mat_charpoly_danilevsky, gr_mat_charpoly_danilevsky, _gr_mat_charpoly_gauss, gr_mat_charpoly_gauss, _gr_mat_charpoly_householder, gr_mat_charpoly_householder (gr_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_mat/_gr_mat_charpoly_danilevsky_inplace.html (generated 2026-10-20).