FLINT3.7.0-dev

gr_mat_diagonalization, gr_mat_diagonalization_generic, gr_mat_diagonalization_precomp

Synopsis#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)source
int 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)source
int 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)source

Compute 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).

Cite this page

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).