Canonical form of symmetric integer matrix M 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$.
 A: 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 
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)
 $$
A: For symplectic unimodular symmetric (or skew) matrices, such a result is shown in
Zarrow, Robert
A canonical form for symmetric and skew-symmetric extended symplectic modular matrices with applications to Riemann surface theory.
Trans. Amer. Math. Soc. 204 (1975), 207–227. 
You might be able to extend it to the nonsymplectic case (though I am a bit skeptical).
A: I don't see how to diagonalize the quadratic form $2xy.$ As far as your conditions, we have
$$ M = \left(  \begin{array}{cc}
  0 & 1  \\\
   1  & 0  
\end{array} 
\right) $$ and
$$ J = \left(  \begin{array}{cc}
  1 & 0  \\\
   0  & -1  
\end{array} 
\right), $$ with
$$  \left(  \begin{array}{cc}
  1 & 0  \\\
   0  & -1  
\end{array} 
\right)
\left(  \begin{array}{cc}
  0 & 1  \\\
   1  & 0  
\end{array} 
\right)
\left(  \begin{array}{cc}
  1 & 0  \\\
   0  & -1  
\end{array} 
\right) = 
\left(  \begin{array}{cc}
  0 & -1  \\\
   -1  & 0  
\end{array} 
\right)
 $$ 
However, the only diagonal matrices with determinant $-1$ are $\pm J,$ which does not work as $x^2 - y^2$ does not represent any numbers congruent to $2 \pmod 4.$ 
Let's see, Conway and Sloane refer to Watson for his 2-adic canonical form for their work on the Mass Formula, so I can recommend the book Integral Quadratic Forms by George Leo Watson. More recent, SPLAG, which is Sphere Packings, Lattices, and Groups by Conway and Sloane. 
