FLINT3.7.0-dev

fmpz_mat_similarity

Synopsis#include <flint/fmpz_mat.h>
void fmpz_mat_similarity(fmpz_mat_t A, slong r, fmpz_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. Requires 0 \le r < n.

Equivalently, d times column r is added to every column j \notin \{r - 1, r\}, and then d times the sum of the rows j \notin \{r - 1, r\} is subtracted from row r. Such transforms preserve the determinant and the characteristic and minimal polynomials.

Cite this page

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