gr_mat_diagonalization, gr_mat_diagonalization_generic, gr_mat_diagonalization_precomp
#include <flint/gr_mat.h>int gr_mat_diagonalization(gr_vec_t D, gr_mat_t L, gr_mat_t R, const gr_mat_t A, int flags, gr_ctx_t ctx)sourceint gr_mat_diagonalization_generic(gr_vec_t D, gr_mat_t L, gr_mat_t R, const gr_mat_t A, int flags, gr_ctx_t ctx)sourceint gr_mat_diagonalization_precomp(gr_vec_t D, gr_mat_t L, gr_mat_t R, const gr_mat_t A, const gr_vec_t eigenvalues, const fmpz_vec_t mult, gr_ctx_t ctx)sourceCompute a diagonalisation L A R = D of a square matrix: D is the vector of eigenvalues repeated according to multiplicity, the columns of R are right eigenvectors and the rows of L = R^{-1} left eigenvectors, so that A = R D R^{-1}. L or R may be NULL to skip computing it.
Over a field, GR_DOMAIN means that A is not diagonalisable over the field. The generic version finds the eigenvalues with gr_mat_eigenvalues and eigenvectors as nullspaces of A - \lambda I; the precomp version takes eigenvalues and multiplicities computed beforehand. gr_mat_diagonalization calls the ring method GR_METHOD_MAT_DIAGONALIZATION, overridden by acb and acf with numerical algorithms; over acb, an approximation from the QR algorithm is certified with acb_mat_eig_simple (Eigenvalue enclosures).
The FLINT team, “gr_mat_diagonalization, gr_mat_diagonalization_generic, gr_mat_diagonalization_precomp (gr_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_mat/gr_mat_diagonalization.html (generated 2026-10-20).
@misc{flint-doc-gr-mat-gr-mat-diagonalization,
author = {{The FLINT team}},
title = {{gr\_mat\_diagonalization, gr\_mat\_diagonalization\_generic, gr\_mat\_diagonalization\_precomp (gr\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_mat/gr_mat_diagonalization.html},
note = {Generated 2026-10-20}
}