The dual lattice is:
Spiritually, it serves a very similar role to the orthogonal complement for linear spaces:
The difference accounts for the “discrete” structure of lattices vs the continuous nature of linear subspaces:
- Lattices have full rank over , hence is uninteresting.
- Lattices require integer combinations and so we need to capture that instead somehow.
Orthogonal Complements
The reason why the orthogonal complement is useful, is that it in some ways captures “everything outside” the original space , i.e. the “complement space”, everything else.
Because the world is made of everything inside a space, and everything outside of it, with nothing in-between, , to check that some is in , you can check that it has no “component” in , by “measuring” it with for every in the dual , i.e. check that it is orthogonal to the orthogonal complement of :
And instead of checking against all of you can check against a basis for :
This is advantageous, because, for instance, testing membership of otherwise requires Gaussian elimination, which takes cubic time.
Additionally, the complement dual basis also allows checking if you are almost in the space , by checking that you are almost not in the dual , i.e. part of which is in is small: if is small, relative to then you are almost orthogonal to every vector in the complement space, which means that if you write in the basis (which span the whole space):
Then the coefficients of are small, so see this:
If the complement basis is also orthogonal, i.e. for all , then:
So if the vectors in “small” and (almost) orthogonal, then so is , which means lies close to : by the triangle inequality, .
Remember: this requires to have short vectors, sounds familiar?
Dual Lattices
The same intuition applies to the dual of a lattice:
Again, you don’t need to check all of , a basis for suffices:
Again, nice, because it makes checking if you are in a lattice easy. In a vector space, every basis is more/less interchangeable: you can simply rescale the basis elements to make them “short” without it affecting the vector space. That is, famously, not the case for lattices: some bases are nicer than others and you can’t easily make a “bad basis” with:
- Large vectors, very “skewed” vectors.
Into a “nice basis” with:
- Short vectors, almost orthogonal vectors.
The good/bad distinction is exactly the same that decides if the basis of the orthogonal complement able to test “proximity” to the space or not: there we also needed a “good basis”, but producing a “good basis” for a linear space is trivially easy because of its continuous nature (which enables Gaussian elimination). Completely analogously, the following is true: is almost an integer (i.e. small in ) if is close to the lattice as long as has short vectors.
To see this, let , and let be “small/short”, then:
Where .
By Cauchy–Schwarz, . Now is short, i.e. is close to a lattice point, but when is short for the basis vectors of ?
If we have a good basis for , where the basis elements are almost orthogonal, i.e. is small whenever , then we can also get a good basis for the dual lattice i.e. every is as short as it can be, namely .
The Dual Basis
The dual lattice for has basis with the property that:
: Anything in lies in :
Since every is an integer combination of and every is an integer combination of .
: Conversely, anything that lies in also lies in :
Let , we can write in the basis since it has full rank over .
For some . We can then consider:
Since , we have , but is also clearly in so by letting we see that is actually an integer and we just wrote as an integer combination of .
Finding
The dual basis pairs one-to-one with the basis elements in : if you fix vectors in , and require that a vector is orthogonal to all of them, that fixes a unique direction for , the condition then fixes the length of .
So when is short?
Observe that does not imply that either or are short, just that is short in the direction, in particular, if they point in very different directions both may be long, while stays 1.
Figure 1
If we subtract from each its projection onto the span of the other :
Then we get , and we define the “height” of above the dimensional basis as .
Since is orthogonal to every with , it is orthogonal to their entire span, which leaves exactly one line for it to live on: the line through . Hence for some , and since lies in the span of the other basis vectors it is orthogonal to :
Which pins down , and with it the length of :
So is short exactly when is almost orthogonal to the other basis vectors: subtracting the projection only ever shortens the vector, so , with equality if and only if is orthogonal to all the others:
For a fixed lattice, is the same for every basis and , so the lengths cannot all be made small. is in turn the dual basis of , so the height of above the other dual vectors is .
Written with the basis vectors as columns, the inner products are the entries of , so we can write the relation between the dual and the original basis as:
Bonus: Decode with The Dual
Let with and short, then by Cauchy–Schwarz:
Where the first term is an integer, in fact a very particular one: for with :
Which is the -th coefficient of in the basis .
Hence if for every , then every lies within of an integer and rounding it to the nearest integer recovers , i.e. recovers itself. This is Babai’s rounding algorithm, and the radius it is guaranteed to decode is:
