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=LUPA = LU of AA in place, and returns the rank of AA. P must have room for as many entries as AA has rows; it receives the row permutation.

If AA is a nonsingular square matrix, it is overwritten with the unit lower triangular LL (without its diagonal) and the upper triangular UU. If AA has rank rr, then UU is in row echelon form with rr nonzero rows, and LL is lower triangular with rr columns and implicit ones on its diagonal. If rank_check is nonzero and AA is found to be rank-deficient, the function stops early and returns 0, leaving AA 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-11-02).