FLINT3.7.0-dev

gr_mat_apply_row_similarity

Synopsis#include <flint/gr_mat.h>
int gr_mat_apply_row_similarity(gr_mat_t M, slong r, gr_ptr d, gr_ctx_t ctx)source

Replaces the n×nn \times n matrix MM by P−1MPP^{-1} M P in place, where PP is the identity matrix with the zero entries of row rr replaced by dd (an elementary similarity transformation). Requires 0≤r<n0 \le r < n; returns GR_DOMAIN if MM is not square or rr is out of range. Such transformations preserve the determinant and the characteristic and minimal polynomials.

Cite this page

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