There is a theorem that states that two quadratic forms over $\mathbb{Q}_p$ are equivalent iff they have the same rank, discriminant and the same $\epsilon$ invariant.
(The last is defined as follows: if $f = \sum_{i=1}^n a_ix_i^2$ then $\epsilon(f) = \prod_{1\le i < j \le n} (a_i,a_j)$, where $(\cdot,\cdot)$ is the Hilbert symbol over $\mathbb{Q}_p$.)
The proof (from Serre's Arithmetic) is based on a previous theorem, which relates these invariants to the elements the forms represent.
However, I do not know how I can show that two particular forms are equivalent (with the same invariants of course). So fix some prime $p$ and consider the following two forms over $\mathbb{Q}_p$:
\begin{equation}
f(x) = x_1^2 + x_2^2 + x_3^2 + x_4^2 - (x_5^2 + x_6^2 + x_7^2) \nonumber
\end{equation}
and
\begin{equation}
g(x) = -(x_1^2 + x_2^2 + x_3^2 + x_4^2 + x_5^2 + x_6^2 + x_7^2) \nonumber
\end{equation}
How can I show in particular that these two are equivalent (without using the classification theorem above)? Thanks.
I think what you probably want from us is this: on pages 43 to 44 of Rational Quadratic Forms by J. W. S. Cassels, CASSELS we find tables of $(a,b)_p$ for odd primes $p,$ then for $p=2, $ finally $p=\infty$ on page 44.
For odd primes $p,$ $$ (1,1)_p = (1,-1)_p = (-1,-1)_p = 1, $$ as we only begin to get $-1$ as an outcome if at least one argument $n$ has $ p^{2k - 1} \parallel n.$ So your two forms have the same invariant $\varepsilon$ as in Serre, defined page 35, then used page 39, Theorem 7. As they have the same rank $7$ and discriminant $-1,$ your two forms agree in $\mathbb Q_p$ for odd finite $p.$
We get a slightly different picture for $p=2$ that is $$ (1,1)_2 = (1,-1)_2 = 1, \; \; \; (-1,-1)_2 = -1. $$ For your first form, we get index pairs $56, 57, 67$ giving a factor of $-1$ each, result is $-1.$ For your second form, all $21$ ordered pairs give $-1,$ once again $-1$ and the two forms are equivalent in $\mathbb Q_2$ as well. Anyway, $$ \left( \begin{array}{c} 3 \\ 2 \end{array} \right) = 3, \; \; \; \left( \begin{array}{c} 7 \\ 2 \end{array} \right) = 21 $$ are both odd, which is what does it. Given that all your coefficients are $\pm 1,$ this amounts to the fact that $3 \equiv 7 \pmod 4.$
The case of $p = \infty$ is different. Serre does that on page 40. If you just look at discriminant, rank, and invariant, they are the same. It seems he leaves the statement that the signature is an invariant to the next page, 41. Sylvester's law of inertia is the fact that, over the reals, rank and signature are a complete set of invariants.