LatticeReduce[{v1,v2,…}]
gives a reduced basis for the set of vectors vi.
LatticeReduce
LatticeReduce[{v1,v2,…}]
gives a reduced basis for the set of vectors vi.
Examples
open all close allBasic Examples (1)
Applications (3)
Starting with trivial integer linear relationships, LatticeReduce can produce more interesting ones:
Find integer linear relationships for
and
of the form
:
a = {{1, 0, 0, -1}, {0, 1, 0, -2}, {0, 0, 1, -3}};a.{1, 2, 3, 1}LatticeReduce preserves linear relationships, and the third row provides
,
, and
:
b = LatticeReduce[a]b.{1, 2, 3, 1}Find polynomial relationships
for
:
{a0, a1, a2, a3, a4} = Table[Round[10 ^ 7Power[3, 1 / 3] ^ i], {i, 0, 4}]The trivial initial relationships:
a = {{1, 0, 0, 0, -a0}, {0, 1, 0, 0, -a1}, {0, 0, 1, 0, -a2}, {0, 0, 0, 1, -a3}, {0, 0, 0, 0, -a4}};b = LatticeReduce[a]b[[1]].t^Range[0, 4]% /. t -> Power[3, 1 / 3]//FullSimplifyFind linear relationships x0+x1 ArcTan[1]+x2 ArcTan[1/5]+x3 ArcTan[1/239]==0:
v = {1, ArcTan[1], ArcTan[1 / 5], ArcTan[1 / 239], 1};{a0, a1, a2, a3, a4} = Round[10 ^ 20 v]Initial trivial relationships:
a = {{1, 0, 0, 0, -a0}, {0, 1, 0, 0, -a1}, {0, 0, 1, 0, -a2}, {0, 0, 0, 1, -a3}}b = LatticeReduce[a]b[[1]].vN[%]Properties & Relations (2)
LatticeReduce produces a new reduced basis for the same lattice:
a = RandomInteger[10, {3, 3}]b = LatticeReduce[a]The product of the norms will decrease:
Times@@(Norm /@ a) ≥ Times@@(Norm /@ b)The determinant or volume of the generator cell is preserved:
Abs[Det[a]] == Abs[Det[b]]The lattice is generated by {v1,v2}, but also by {w1,w2} produced by LatticeReduce:
v1 = {12, 2};
v2 = {13, 4};{w1, w2} = LatticeReduce[{v1, v2}]The original cell is pink, and the one produced by LatticeReduce is cyan:
lattice = Select[Flatten[Table[n1 v1 + n2 v2, {n1, -5, 5}, {n2, -5, 5}], 1], 0 <= #[[1]] ≤ 25 && -4 <= #[[2]] ≤ 8&];Graphics[{{Opacity[0.8], Pink, Tooltip[Polygon[{{0, 0}, v1, v1 + v2, v2}], "v-cell"]}, {Opacity[0.8], Cyan, Tooltip[Polygon[{{0, 0}, w2, w2 + w1, w1}], "w-cell"]}, Point[lattice], {Red, Arrow[{{0, 0}, v1}]}, {Green, Arrow[{{0, 0}, v2}]}, {Blue, Arrow[{{0, 0}, w1}]}, {Yellow, Arrow[{{0, 0}, w2}]}}, Axes -> True]Related Guides
Related Links
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), LatticeReduce, Wolfram Language function, https://reference.wolfram.com/language/ref/LatticeReduce.html.
CMS
Wolfram Language. 1988. "LatticeReduce." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LatticeReduce.html.
APA
Wolfram Language. (1988). LatticeReduce. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LatticeReduce.html
BibTeX
@misc{reference.wolfram_2026_latticereduce, author="Wolfram Research", title="{LatticeReduce}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/LatticeReduce.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_latticereduce, organization={Wolfram Research}, title={LatticeReduce}, year={1988}, url={https://reference.wolfram.com/language/ref/LatticeReduce.html}, note=[Accessed: 12-June-2026]}