Advanced maths

Two dimensional rational cone Hilbert basis calculator

Compute the Hilbert basis of a pointed two-dimensional rational cone generated by two integer rays.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Compute the Hilbert basis of a pointed two-dimensional rational cone generated by two integer rays. The basis is the minimal collection of lattice vectors whose nonnegative integer combinations generate every lattice point in the cone. The calculator normalizes the extreme rays, enumerates a fundamental parallelogram exactly and verifies adjacent unimodular sectors. It is a lattice-generation problem, not an ordinary real-vector basis calculation.

THE FORMULAEvery lattice point in a pointed rational cone is a nonnegative integer combination of its Hilbert basis.

A worked example

The cone between (1,0) and (1,2) needs the intermediate primitive generator (1,1). These three generators are indecomposable lattice points, and each neighboring pair has determinant one. A signed lattice basis alone would not encode nonnegative cone membership.

Good to know

Two nonzero counterclockwise rays enclosing an angle below π; integer coordinates within ±1000, primitive determinant≤10,000 and enumeration cap 1,000,000. Exact 2D result with adjacent unimodular-sector checks; not a higher-dimensional cone solver.

Ray orientation and the pointed cone

The two nonzero rays must be counterclockwise with a positive determinant and an angle strictly below pi. This selects a pointed cone containing no full line.

Multiplying a ray by a positive integer does not change the cone, so the tool first divides each ray by the gcd of its coordinates. Reversing ray order changes the orientation condition and is rejected rather than silently selecting the other sector.

An interior lattice ray completes the planar Hilbert basisExtreme rays (1,0),(1,2)Need also (1,1)Adjacent det = 1
The cone between (1,0) and (1,2) needs the intermediate primitive generator (1,1). These three generators are indecomposable lattice points, and each neighboring pair has determinant one. A signed lattice basis alone would not encode nonnegative cone membership. Static schematic; numerical labels define the example.

A nonnegative monoid basis for a cone differs from a signed lattice basis, which allows negative coefficients. The Finite field trace norm and minimal polynomial calculator offers a complementary calculation under its own stated assumptions.

Real generation versus integer generation

Two extreme rays span every cone point with nonnegative real coefficients. They may fail to generate all lattice points with integer coefficients.

For example, an interior lattice point can sit between two primitive extreme rays and remain indecomposable into their nonnegative integer sums. A Hilbert basis adds exactly the lattice generators needed. It is generally larger than a two-vector linear basis, and its members are not required to be linearly independent.

Worked example and mathematical rule

The cone between (1,0) and (1,2) needs the intermediate primitive generator (1,1). These three generators are indecomposable lattice points, and each neighboring pair has determinant one. A signed lattice basis alone would not encode nonnegative cone membership.

Every lattice point in a pointed rational cone is a nonnegative integer combination of its Hilbert basis.

The fundamental parallelogram

After primitive normalization, the determinant measures the index of the lattice generated by the two extreme rays. The half-open fundamental parallelogram contains representatives for those residue classes.

Enumerating its lattice points plus the primitive extremes supplies a finite candidate set for the Hilbert basis. All determinants and coordinates are handled with exact integers. This avoids rounding a point onto the wrong side of a ray or confusing an almost-integer coordinate with an actual lattice point.

Indecomposable lattice generators

Candidates are processed in an order compatible with positive cone height. A candidate is unnecessary if it can be written as a sum of earlier cone points, while an indecomposable candidate becomes a basis generator.

The final vectors are ordered by direction. Consecutive Hilbert basis rays in this two-dimensional setting form unimodular sectors, so their determinants should be one. That exact certificate helps validate the generated list rather than relying solely on the candidate enumeration.

Determinant one and larger-index examples

When the primitive extreme rays have determinant one, they already form a lattice basis and no interior Hilbert generator is needed. Larger determinant does not mean the number of Hilbert generators equals that determinant; decomposability can remove many parallelogram candidates.

Scaling a primitive ray should leave the result unchanged after normalization. Applying a unimodular integer coordinate transformation maps the entire lattice problem without changing its essential generation structure.

Scope of the planar method

The supported coordinate and determinant bounds control the enumeration area and runtime. A cone in three or more dimensions needs a substantially different implementation, and the simple adjacent-determinant certificate is special to the planar case.

The result does not solve an arbitrary integer program or enumerate every lattice point of an unbounded cone. Use the returned generators to express cone lattice points as nonnegative integer combinations, keeping the ambient lattice fixed rather than changing it through arbitrary real coordinate scaling.

A few questions, answered

Why can there be more than two generators?

Real cone spanning and integer lattice generation are different requirements.

Do positive ray multiples change the result?

No. Rays are normalized to primitive lattice vectors.

What does adjacent determinant one verify?

Neighboring returned rays form unimodular lattice sectors.

Does this support three-dimensional cones?

No. The exact enumeration and certificate here are specifically two-dimensional.

Find your calculator

Start typing to explore the library.