Given two $\ell \times \ell$ symmetric matrices, is there an easy way to check if they define the same quadratic form over $\mathbb{Z}$ (up to a change of basis)?
In particular, among other examples, I am interested in the following two matrices $$\begin{pmatrix} 4 & 2 & 2 & 4 & 4 \\ 2 & 4 & 2 & 4 & 4 \\ 2 & 2 & 4 & 4 & 4 \\ 4 & 4 & 4 & 16 & 12 \\ 4 & 4 & 4 & 12 & 16 \end{pmatrix} \qquad , \qquad \begin{pmatrix} 8 & 6 & 6 & 6 & 6 \\ 6 & 8 & 6 & 6 & 6 \\ 6 & 6 & 8 & 6 & 6 \\ 6 & 6 & 6 & 8 & 6 \\ 6 & 6 & 6 & 6 & 8 \end{pmatrix} $$
I actually conjecture that they don't, so even a partial criteria (for instance an invariant common to all equivalent matrices) would suffice.
For integer coefficient quadratic forms, equivalence is $$ P^T A P = B, $$ the requirement being that $P$ have all integer elements and determinant $\pm 1.$ So, one invariant is determinant. Your pair have different determinants, those being $2048$ and $512.$
The second thing is, for positive definite forms (these both are) to find the minimum, that is the smallest integer that cn be written as $x^T Ax$ where the column vector $x$ has integer elements, not all zero. That will take me several minutes.