← LibraryThe Gram-Schmidt Orthogonalisation ProcedureEngineering · MathematicsLesson 246/385← PrevNext →
ArticlePublished 7 Aug 20262 min readBy Kevin JoginGram-Schmidtorthogonalisationprojectionmu coefficients

Lattices and LLL Reduction

The Gram-Schmidt Orthogonalisation Procedure

Gram-Schmidt orthogonalisation, the coefficients that drive lattice reduction, and why the orthogonal vectors themselves are not lattice vectors.

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

Gram-Schmidt supplies the measurements that lattice reduction acts on. It is not itself a reduction — the vectors it produces are generally not in the lattice — but the coefficients it computes are exactly what LLL manipulates.

The procedure

Each vector has its projections onto the preceding orthogonal vectors subtracted, leaving the component orthogonal to everything before it.

b_i = b_i - sum over j<i of mu_{ij} b_j, mu_{ij} = <b_i, b_j> / <b_j, b*_j>The mu coefficients are what reduction manipulates.

What the coefficients mean

Size of mu
Measures how far the basis is from orthogonal. Coefficients larger than one half indicate a vector that can be shortened by subtracting a multiple of an earlier one.
Length of the orthogonal vectors
A decreasing sequence indicates a well-ordered basis. Sharp drops signal that a swap will help.
Product of orthogonal lengths
Equals the lattice determinant, independent of the basis.

Size reduction

Size reduction of one pair

  1. Compute the coefficientTake mu for the pair of indices.
  2. RoundRound to the nearest integer.
  3. SubtractSubtract that integer multiple of the earlier vector.
  4. UpdateRecompute the affected coefficients.

Numerical considerations

Implementing Gram-Schmidt for lattice reduction
ApproachCostReliability
Floating pointFastCan fail silently on skewed input
Exact rationalSlow; denominators growCorrect
Integral (scaled)ModerateCorrect — see integral LLL
Floating point with verificationFast plus a checkCorrect if the check is exact

Source. Henri Cohen, A Course in Computational Algebraic Number Theory, Springer GTM 138 — 2.5.2. 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.

Continue learning

Lattice Definitions and Quadratic FormsArticle · MathematicsNEXT LESSON →Lattice Determinant and the Hadamard BoundArticle · MathematicsLLL-Based Hermite Normal Form ComputationArticle · MathematicsThe LLL Lattice Basis Reduction AlgorithmArticle · Mathematics