KEVOS
ArticlesServicesCase studiesAboutContact
ArticlesServicesCase studiesAboutContact
← ArticlesLLL for Linearly Dependent Generating SetsEngineering · Engineering MathematicsLesson 752/884← PrevNext →
ArticlePublished 7 Aug 20262 min readBy Kevin JoginLLLdependent vectorsgenerating setkernel
On this page

Ask about this page

KEVOS AILLL for Linearly Dependent Generating Sets

KEVOS knowledge first · trusted web sources when needed

Lattices and LLL Reduction

LLL for Linearly Dependent Generating Sets

Extending LLL to generating sets that are not independent, and using the resulting zero vectors to extract relations.

Engineering / MathematicsLattices and LLL Reduction2 min readKV-MATH-0550

Standard LLL assumes an independent basis. Generating sets in practice are frequently dependent, and the extension that handles them turns the dependency into useful output rather than an error.

What goes wrong

Pitfall

With dependent input, some Gram-Schmidt vector becomes zero and the Lovasz condition involves a division by zero. Naive code either crashes or, worse, proceeds with a corrupted coefficient.

The modification

When a Gram-Schmidt vector vanishes, the corresponding basis vector lies in the span of its predecessors. Size reduction against those predecessors then reduces it to the zero vector, which is moved to the end and dropped.

LLL with dependent input

  1. DetectIdentify a vanishing Gram-Schmidt vector.
  2. Size reduce fullyReduce the offending vector against all predecessors; it becomes zero.
  3. RecordThe coefficients used constitute a dependency relation.
  4. RemoveMove the zero vector to the end and reduce the working rank.
  5. ContinueResume reduction on the remaining vectors.

Key point

The dependency relation recorded at removal is the valuable output. Collecting these relations gives a generating set for the kernel of the matrix whose columns were the input — which is exactly the integer kernel.

Two outputs

What the dependent-input variant returns
OutputMeaning
Surviving non-zero vectorsA reduced basis of the lattice generated by the input
Recorded relationsA generating set for the integer kernel
Transformation matrixExpresses the output in terms of the input; unimodular

Numerical caution

Caution

Detecting a vanishing Gram-Schmidt vector in floating point requires a threshold, and choosing it badly either misses genuine dependencies or falsely reports them. This is one of the situations where integral LLL is strongly preferable — exact zero is unambiguous.

Applications

Dependent-input LLL is the workhorse behind integer kernel computation, and it also underlies dependence detection, where a deliberately over-determined generating set is constructed so that the relations found reveal the sought dependency.

Source. Henri Cohen, A Course in Computational Algebraic Number Theory, Springer GTM 138 — 2.6.4. Structural reference unverified: the source file was not available during authoring; chapter and section numbers are taken from the published edition and have not been checked against a physical copy.

Related pages

  • Integer Kernel and Image via LLL
  • Integral LLL: Avoiding Floating Point

Continue learning

Integral LLL: Avoiding Floating PointArticle · Engineering MathematicsNEXT LESSON →Integer Kernel and Image via LLLArticle · Engineering MathematicsLLL with Deep InsertionsArticle · Engineering MathematicsDetecting Algebraic and Linear Dependence with LLLArticle · Engineering Mathematics
KEVOS · Engineering, manufacturing and project improvement
ArticlesServicesCase studiesAboutContact
© 2026 KEVOS®