Let $M$, $N$ be a symmetric matrix over a ring $R$.
$M$ and $N$ are said to be equivalent if there exist an invertible
matrix $U$ (over the same ring $R$) such that $N=U M U^T$ ($U^T$ is the transpose of $U$).
A question is that what is the simple canonical form of $M$
under such an equivalent relation.


We know that when $R$ is the ring of real numbers, every
real symmetric matrix is equivalent to
an diagonal matrix with diagonal entries being 1, -1, or 0.


When $R$ is the ring of integers, do we have a similar result?


If there is no nice results, we may assume $M$
to satisfy additional conditions:


(a) $|\det(M)|=1$


(b) There exist a $J$ such that $J^2=1$ and $JMJ^T=-M$.


Thanks!


Edit: I am also interested in finding the simple canonical form of integer symmetric matrices $M$, that satisfy


(a) $|\det(M)|=1$


(b) There exist a $J$ such that $J^2=-1$ and $JMJ^T=-M$.



Canonical form of symmetric integer matrix M
It's all in the correct reference. Cassels, *Rational Quadratic Forms*, chapter 9 "Integral Forms over the Rational Integers," pages 163-164, Examples 9-11. Example 11(i) says that, for "odd" matrices, we can cut down the dimension by 2 and write $y\_1^2 - y\_2^2 + g(z\_1, \ldots , z\_{n-2}).$ The determinant of $g$ is still $\pm 1,$ so the only problem is that $g$ may be "even." 


Next, if $f$ is "even" the quadratic form can, in fact, be written $ 2y\_1 y\_2 + g(z\_1, \ldots , z\_{n-2}).$


So, all we really need is to show, as in Sylvester's Law of Inertia, that the resulting form $g$ continues to be indefinite. Presumably your condition with $J M J^T = -M$ can do this. 


Otherwise, without your $J$ condition, Example 11(vi) says that either $f$ or $-f,$ if "even," is equivalent to a sum of some $2x\_j y\_j$ terms along with a single $\mathbb E\_8$ lattice. [CASSELS](http://store.doverpublications.com/0486466701.html) 


I was uneasy about the possible need to mix 2 by 2 blocks of both types, despite Hahn's statement, but 
$$ 
 \left( \begin{array}{cccc}
 3 & 4 & 2 & 2 \\\
 2 & 3 & 1 & 2 \\\
 0 & 1 & 1 & 1 \\\ 
 2 & 3 & 2 & 1 
\end{array} 
 \right)
 \left( \begin{array}{cccc}
 1 & 0 & 0 & 0 \\\
 0 & -1 & 0 & 0 \\\
 0 & 0 & 0 & 1 \\\ 
 0 & 0 & 1 & 0 
\end{array} 
 \right)
 \left( \begin{array}{cccc}
 3 & 2 & 0 & 2 \\\
 4 & 3 & 1 & 3 \\\
 2 & 1 & 1 & 2 \\\ 
 2 & 2 & 1 & 1 
\end{array} 
 \right) = 
 \left( \begin{array}{cccc}
 1 & 0 & 0 & 0 \\\
 0 & -1 & 0 & 0 \\\
 0 & 0 & 1 & 0 \\\ 
 0 & 0 & 0 & -1 
\end{array} 
 \right)
 $$


