# Existence of Unimodular Congruence Transformation for Symmetric, Integer matrices

Two symmetric, integer valued matrices, $K_1$ and $K_2$, are congruent if there exists a unimodular integer matrix, $X$, such that $$X^T K_1 X = K_2$$ What are the conditions on the existence of such a transformation, $X$? If it can be shown that it exists, is there a general procedure for constructing such a matrix?

This can be rephrased as asking whether two integer lattices are equivalent.

It's much easier to see if the two integer lattices are equivalent if you have basis matrices $B_1$ and $B_2$ for them. In the op notation this would mean writing $K_1=B_1^T B_1$ and $K_2=B_2^T B_2$. If you have $B_1$ and $B_2$ you can bring them to Hermite Normal Form (HNF) (easy to do for example in Mathematica) and if the resulting form is the same for both, then they describe the same lattice in a different basis.
• How would I find the basis matrices if I don't have them? Say for example that $$K = \left(\begin{array}{cccc} 0 & 2 & 1 & 1 \\ 2 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 \\ 1 & 0 & 0 & 1 \end{array}\right)$$ May 27, 2016 at 5:09
• Alternatively, if $K_1$ and $K_2$ have the same Smith Normal Form, is it possible to show that such an $X$ must exist? May 27, 2016 at 6:46
• This is quite subtle but I am not sure that checking whether their HNF's are equal is equivalent to the criterion in the question. For instance, if $H_2=CH_1$ for some rotation $C\in O_n(\mathbb{R})$, then the criterion is fulfilled (by $C^TC=1$) but $H_2$ need not be a HNF. Nov 24, 2020 at 10:03