# How do you construct a lattice from its basis or its Gram Matrix?

I'm really having trouble trying to understand this. A few weeks back, I got pretty interested in sphere packing and I'm trying to grasp the idea of using a matrix to represent the basis of a lattice. I've been using lattices like this one $\left(\begin{array}\12 & 0 & 0\\ 1 & \sqrt3 & 0\\1 & \frac{1}{\sqrt3} &\frac{2\sqrt6}{3}\end{array}\right)$ for the fcc lattice, because this represents the three vectors $(2,0,0)$, $(1,\sqrt3,0)$, and $(1,\frac{1}{\sqrt3},\frac{2\sqrt6}{3})$ that make the fundamental parallelipipid for the lattice. I think this lattice is also represented by $A_3$. It says here that the Gram Matrix of $A_3$ is $\left(\begin{array}\12 & -1 & 0\\-1 & 2 & -1\\0 & -1 & 2\end{array}\right)$. How is the Gram Matrix related to the basis I've been using? What about the basis they give? Is there a fast way to construct a lattice and find its density from a Gram Matrix? Everything I've found so far is over my head.

-
Wouldn't integer-lattices be a more appropriate tag than vector-lattices for this question? (Judging from the tag-wiki's I linked to.) – Martin Sleziak Dec 15 '12 at 8:42
Take a careful look at this math.rwth-aachen.de/~Gabriele.Nebe/LATTICES/Brandt_2.html which is the "even lattices" in dimension 3 up to a fairly large discriminant in absolute value. – Will Jagy Dec 15 '12 at 23:20
Wow, excellent. That's a great resource. – hombre Dec 16 '12 at 0:01
Well, from the viewpoint of number theory, the "odd lattices" are easier to deal with, such as the sum of three squares, see math.rwth-aachen.de/~Gabriele.Nebe/LATTICES/Brandt_1.html One needs both lists. The choice of which list is: out of $A,B,C,R,S,T,$ are all three of $R,S,T$ even, or is at least one of them odd. Here the quadratic form is $$f(x,y,z) = A x^2 + B y^2 + C z^2 + R y z + S z x + T x y.$$ – Will Jagy Dec 16 '12 at 3:26

What they actually do on the website, which saves a bunch of square root signs, is to realize the lattice in $\mathbb R^4$ as

$$\left( \begin{array}{rrrr} 1 & -1 & 0 & 0 \\ 0 & 1 & -1 & 0\\ 0 & 0 & 1 & -1 \end{array} \right) \cdot \left( \begin{array}{rrr} 1 & 0 & 0 \\ -1 & 1 & 0\\ 0 & -1 & 1 \\ 0 & 0 & -1 \end{array} \right) = \left( \begin{array}{rrr} 2 & -1 & 0 \\ -1 & 2 & -1\\ 0 & -1 & 2 \end{array} \right).$$ Here you are given basis vectors as the three rows of the rectangular matrix on the left, or the columns of the matrix on the right, which is its transpose. That is the fundamental relation, call it $$B \; B^T = G.$$

For the version you want, squre matrices over the integers are possible: $$\left( \begin{array}{rrr} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{array} \right) \cdot \left( \begin{array}{rrr} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{array} \right) = \left( \begin{array}{rrr} 2 & 1 & 1 \\ 1 & 2 & 1\\ 1 & 1 & 2 \end{array} \right).$$

If you really want, you can write this in lower/upper triangular square matrices. This can be done with CHOLESKY, which can be done by hand here. You should have been using $$\left( \begin{array}{rrr} \sqrt 2 & 0 & 0 \\ \sqrt{ \frac{1}{2} } & \sqrt{ \frac{3}{2} } & 0 \\ \sqrt{ \frac{1}{2} } & \sqrt{ \frac{1}{6} } & \sqrt{ \frac{4}{3} } \end{array} \right) \cdot \left( \begin{array}{rrr} \sqrt 2 & \sqrt{ \frac{1}{2} } & \sqrt{ \frac{1}{2} } \\ 0 & \sqrt{ \frac{3}{2} } & \sqrt{ \frac{1}{6} } \\ 0 & 0 & \sqrt{ \frac{4}{3} } \end{array} \right) = \left( \begin{array}{rrr} 2 & 1 & 1 \\ 1 & 2 & 1\\ 1 & 1 & 2 \end{array} \right).$$

Finally, the relationship required for distinct gram matrices to represent the same lattice is called "equivalence." If you have gram matrices $G,H,$ equivalence means there is an integer matrix $P$ with $\det P = 1$ such that $$P G P^T = H.$$ Naturally, if you take $Q = P^{-1}$ you get $$Q H Q^T = G$$ as well.

Gaze in awe: $$\left( \begin{array}{rrr} 1 & 0 & 0 \\ -1 & 1 & 0 \\ 0 & -1 & 1 \end{array} \right) \cdot \left( \begin{array}{rrr} 2 & 1 & 1 \\ 1 & 2 & 1\\ 1 & 1 & 2 \end{array} \right) \cdot \left( \begin{array}{rrr} 1 & -1 & 0 \\ 0 & 1 & -1 \\ 0 & 0 & 1 \end{array} \right) = \left( \begin{array}{rrr} 2 & -1 & 0 \\ -1 & 2 & -1\\ 0 & -1 & 2 \end{array} \right).$$

-
I am gazing in awe. Muchas gracias – hombre Dec 15 '12 at 22:53