FLINT3.7.0-dev

fmpq_mat_similarity

Synopsis#include <flint/fmpq_mat.h>
void fmpq_mat_similarity(fmpq_mat_t A, slong r, fmpq_t d)source

Replaces the square matrix A by P^{-1} A P, where P is the identity matrix with the entries in row r and every column j \notin \{r - 1, r\} replaced by d (see fmpz_mat_similarity). Wrapper of gr_mat_apply_row_similarity; throws if A is not square or r is out of range.

Cite this page

The FLINT team, “fmpq_mat_similarity (fmpq_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq_mat/fmpq_mat_similarity.html (generated 2026-10-20).