KEVOS
ArticlesServicesCase studiesAboutContact
ArticlesServicesCase studiesAboutContact
← ArticlesInteger Kernel and Image via LLLEngineering · Engineering MathematicsLesson 753/884← PrevNext →
ArticlePublished 7 Aug 20262 min readBy Kevin Jogininteger kernelimageLLLlattice basis
On this page

Ask about this page

KEVOS AIInteger Kernel and Image via LLL

KEVOS knowledge first · trusted web sources when needed

Lattices and LLL Reduction

Integer Kernel and Image via LLL

Computing a reduced basis of the integer kernel and image of a matrix, and why this is not the same as clearing denominators from a rational kernel.

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

The kernel of an integer matrix over the integers is a lattice. Computing a basis for it — rather than merely a spanning set — requires either a normal form or lattice reduction, and reduction generally gives a far better basis.

Why the rational kernel is not enough

Pitfall

Computing the kernel over the rationals and clearing denominators gives integer vectors spanning a sublattice of the true integer kernel, generally a proper one. The rank is right and the basis is wrong.

The correct object is the saturation: the set of all integer vectors in the rational kernel. This is what an integer kernel algorithm must return.

The LLL construction

Build an auxiliary lattice by stacking the matrix, scaled by a large factor, above an identity block. Reducing this lattice forces vectors in the kernel to become short, because their scaled part vanishes.

Rows of [ c*A ; I ] for a large constant cVectors whose A-part is zero have length coming only from the identity block, so they are much shorter.

Integer kernel via LLL

  1. Choose the scaleTake c large enough that any vector with non-zero A-part is longer than every kernel vector.
  2. ReduceApply LLL to the stacked lattice.
  3. ExtractVectors whose upper part is zero give the kernel; read the kernel vector from the lower block.
  4. VerifyMultiply back through the original matrix to confirm.

Key point

The scaling constant is the whole trick. It must be large enough to separate kernel vectors from everything else, but making it unnecessarily large inflates the entries and slows the reduction. A bound derived from Hadamard's inequality is the usual choice.

The image

The image over the integers is the module generated by the columns. Its canonical basis is the Hermite normal form; a short basis is obtained by LLL reduction of the columns directly.

Canonical versus short bases
ObjectCanonical basisShort basis
ImageHermite normal formLLL on the columns
KernelHermite normal form of a kernel spanning setLLL on the stacked construction

Note

Canonical and short are different goals. Use the Hermite form when modules must be compared for equality; use a reduced basis when the vectors will be used in further computation, where short entries matter more than canonicity.

Alternative via dependent LLL

The variant described in LLL for dependent generating sets produces kernel relations directly as a by-product, avoiding the scaling construction entirely. It is often the simpler route when an implementation of that variant is available.

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

  • Kernel and Image of a General Matrix
  • The Smith Normal Form Algorithm
  • LLL-Based Hermite Normal Form Computation
  • LLL for Linearly Dependent Generating Sets
  • Detecting Algebraic and Linear Dependence with LLL

Continue learning

LLL for Linearly Dependent Generating SetsArticle · Engineering MathematicsNEXT LESSON →Detecting Algebraic and Linear Dependence with LLLArticle · Engineering MathematicsIntegral LLL: Avoiding Floating PointArticle · Engineering MathematicsFinding Short Vectors in LatticesArticle · Engineering Mathematics
KEVOS · Engineering, manufacturing and project improvement
ArticlesServicesCase studiesAboutContact
© 2026 KEVOS®