FLINT3.7.0-dev

fq_mat_lu

Synopsis#include <flint/fq_mat.h>
slong fq_mat_lu(slong * P, fq_mat_t A, int rank_check, const fq_ctx_t ctx)

Computes a generalised LU decomposition PA = LU of A in place, and returns the rank of A. P must have room for as many entries as A has rows; it receives the row permutation.

If A is a nonsingular square matrix, it is overwritten with the unit lower triangular L (without its diagonal) and the upper triangular U. If A has rank r, then U is in row echelon form with r nonzero rows, and L is lower triangular with r columns and implicit ones on its diagonal. If rank_check is nonzero and A is found to be rank-deficient, the function stops early and returns 0, leaving A in an undefined state.

Cite this page

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