What is a lattice?

In an extremely generalized description, a lattice can be thought of as a grid of points. Although the grid may be stretched, skewed, or rotated, the points must follow some exact repeating structure. For example, take the lattice $\ZZ^2$, every possible point in a $2$-dimensional graph where each coordinate of a point is an integer. We show a subset of $\ZZ^2$ in Figure 1.

Figure 1. $\ZZ^2$ displayed on a graph.

However, Figure 1 does not display the entirety of the lattice, because $\ZZ^2$ extends infinitely past the displayed graph. This is why it is helpful to define objects more formally: \[ \ZZ^2 = \left\{ \begin{pmatrix} z_1\\ z_2 \end{pmatrix} : z_1,z_2\in\ZZ \right\}, \] meaning the set of all points, represented as a vector from the origin, whose coordinates are integers.

In practice, if we wanted to describe a specific lattice, it would be infeasible (perhaps impossible) to provide infinitely many points. How would we actually provide numerical values to describe a specific lattice? An important aspect of any lattice is that, because these points follow a repeating structure, it can be described as a finite collection of vectors: a basis.

More precisely, a lattice basis is an ordered collection of linearly independent vectors whose integer combinations generate the lattice (meaning roughly that none of the vectors can be constructed from adding other vectors). In our $\ZZ^2$ example, we define our basis $B$ as \[ b_1= \begin{pmatrix} 1\\ 0 \end{pmatrix}, \qquad b_2= \begin{pmatrix} 0\\ 1 \end{pmatrix}, \qquad B = \left(b_1, b_2\right) = \begin{pmatrix} 1 & 0\\ 0 & 1 \end{pmatrix} = I_2, \] where $I_2$ is the identity matrix. The lattice $L$ generated by the basis $B$ is \[ L(B) = B\ZZ^2 = \ZZ^2. \]

Figure 2. Integer combinations of the basis vectors \(b_1\) and \(b_2\).

Figure 2 shows graphically how integer combinations of the two basis vectors can be used to reach a particular point in the lattice. The same process can be used to reach every point in the lattice. An important note: a lattice can be represented by many different bases. In fact, even $\ZZ^2$ can be generated by infinitely many different bases (more on this later). Figure 3 shows a simple example of another basis that generates the same lattice $\ZZ^2$ and how basis vectors can be combined to reach other points.

Figure 3. $\ZZ^2$ generated from a different basis.

So far we have focused on a relatively simple lattice, but the coordinates of lattice points are not restricted to integers, nor are lattices restricted to two dimensions. For example, take the basis \[ B = (b_1, b_2, b_3) = \begin{pmatrix} \pi & 2\pi & e\\ 3 & 7 & 1\\ 1 & \sqrt{2} & \pi \end{pmatrix}. \]

The lattice generated by this basis is \[ L(B) = \left\{ z_1 b_1 + z_2 b_2 + z_3 b_3 : z_1,z_2,z_3\in\ZZ \right\}. \] This lattice is shown in Figure 4.

Figure 4. Example of a three dimension lattice (generated in Desmos).

Determinant

A basis does more than generate the lattice; it also describes the ``space'' a lattice takes. For now, we consider the case where the basis matrix is square. In two dimensions, basis vectors $b_1$ and $b_2$ form the fundamental parallelogram, as shown in Figure 5.

Figure 5. The fundamental parallelogram formed by basis vectors $b_1$ and $b_2$.

Given the basis \[ B = (b_1, b_2) = \begin{pmatrix} a & b\\ c & d \end{pmatrix}, \] the determinant is \[ \det(B) = ad - bc. \] The area of the fundamental parallelogram is \[ \lvert \det(B) \rvert. \]

In higher dimensions, this geometric shape is the fundamental parallelepiped. In three dimensions, the volume of this shape is $\lvert\det(B)\rvert$. In $n$ dimensions, $\lvert\det(B)\rvert$ similarly gives its $n$-dimensional volume. For a matrix $B=(a_{ij})\in\RR^{n\times n}$, the general formula is \[ \det(B) = \sum_{\sigma\in S_n} \operatorname{sgn}(\sigma) \prod_{i=1}^{n} a_{i,\sigma(i)}, \] where $S_n$ is the set of all permutations of the numbers $\{1,\ldots,n\}$, with a sign determined by each permutation.

Rank

Something that we have implicitly assumed throughout this post is that a lattice spans all dimensions. Consider the basis $B=(b_1)$ with $b_1=\left(\begin{smallmatrix}0\\1\end{smallmatrix}\right)$ in Figure 6.

Figure 6. The span of a not-full rank lattice.

In this case, the lattice has a rank of $1$, whereas previous $\ZZ^2$ example had a lattice of rank $2$. This can be generalized as follows: the rank $k$ of a lattice $L \subseteq \RR^n$ is the dimension of its span, i.e. if $B=(b_1,\ldots,b_k)$ is a basis of $L$, then \[ \operatorname{rank}(L) = \dim\left(\Span_{\RR}(b_1,\ldots,b_k)\right) = k. \] When $k = n$, we call the lattice full rank.

A consequence of this is that a basis $B$ that represents a full rank lattice $L \subseteq \RR^n$ must span all $n$ dimensions, meaning its basis $B \in \RR^{n\times n}$ is square. This also means the determinant of $B$ cannot be zero, i.e. $\det(B) \neq 0$, so it is invertible. For a full rank lattice, \[ \det(L)=\lvert\det(B)\rvert. \] We will shortly see why this value does not depend on which basis $B$ we choose.

A bit more exact definition of span

Given vectors $b_1,\ldots,b_k$, their real span is the set of all real linear combinations of those vectors: \[ \Span_{\RR}(b_1,\ldots,b_k) = \left\{ \sum_{i=1}^{k} r_i b_i : r_i\in\RR \right\}. \] The dimension of this span, denoted $\dim(\Span_{\RR}(\cdot))$, is the number of linearly independent directions it contains.

Inverse matrices

A basis matrix $B \in \RR^{n \times n}$ of a full rank lattice does not collapse any dimension, so its transformation can be reversed, i.e. $BB^{-1} = B^{-1}B = I_n$. Defining the full rank basis \[ B= \begin{pmatrix} a & b\\ c & d \end{pmatrix}, \] the inverse can be calculated as \[ B^{-1} = \frac{1}{ad-bc} \begin{pmatrix} d & -b\\ -c & a \end{pmatrix}. \] Recall that for a base of a full rank lattice, $\det(B) = ad - bc \neq 0$.

Unimodular Matrix

An important matrix that will come up is the unimodular matrix $U \in \GL \subseteq \ZZ^{n \times n}$, where $\GL$ is the General Linear group of integers over $n$ dimensions. This has the special property $\det(U) = \pm 1$.

``Who cares?'' I imagine the reader asking. Well, an important consequence is that \[ U \ZZ^n = \ZZ^n. \]

To see why, first consider any $y\in U\ZZ^n$. By definition, $y=Uz$ for some $z\in\ZZ^n$. Since both $U$ and $z$ have integer entries, $y$ must also have integer entries. Therefore, $U\ZZ^n\subseteq\ZZ^n$.

Conversely, consider any $y\in\ZZ^n$. Because $\det(U)=\pm1$, the inverse $U^{-1}$ also has integer entries (exercise: prove it!). Let $z=U^{-1}y$. Then $z\in\ZZ^n$, and \[ Uz=UU^{-1}y=y. \] Therefore, every $y\in\ZZ^n$ is also contained in $U\ZZ^n$, giving $\ZZ^n\subseteq U\ZZ^n$. Thus, $U\ZZ^n=\ZZ^n$.

Putting it all together

Let $B,B'\in\RR^{n\times k}$ be basis matrices of rank $k$ lattices in $\RR^n$. Then \[ L(B)=L(B') \iff B'=BU \] for some $U\in\GLk$. Notice we are not assuming full rank here.

A graph!

We can show this graphically. Define $B = (b_1, b_2)$ and \[ U= \begin{pmatrix} a & b\\ c & d \end{pmatrix} \in \GL. \] Consider \[ B' = BU = (b_1,b_2) \begin{pmatrix} a & b\\ c & d \end{pmatrix} = \left( ab_1+cb_2,\; bb_1+db_2 \right). \] See Figure 7, where we show that these two bases represent the same lattice.

Figure 7. Two bases that represent the same lattice.

A formula!

In more formulaic terms, consider a full rank lattice $L\subseteq\RR^n$ with bases $B$ and $B'$: \[ \begin{aligned} L(B') &= B'\ZZ^k && \text{by definition},\\ &= BU\ZZ^k && \text{since } B'=BU,\\ &= B\ZZ^k && \text{since } U\ZZ^k=\ZZ^k,\\ &= L(B) && \text{by definition}. \end{aligned} \] When the lattice is full rank, $k=n$, so $B$ and $B'$ are square. This additionally means that, since determinants are multiplicative, \[ \det(BU) =\det(B)\det(U). \] Because $U$ is unimodular, $\det(U) = \pm 1$, so \[ \lvert \det(BU) \rvert = \lvert \det(B) \rvert. \] Thus, although the basis may change shape, its fundamental volume remains unchanged.