Find the rank and signature of the quadratic forms: (a)$x_1x_2+x_2x_3+....+x_{2k-1}x_{2k} $
(b)$\sum_{i,j=1}^{n} (x_i - x_j)^2$
I am stuck with both of these. In (a) I was thinking of turning each $x_ix_{i+1} $ into $\frac{1}{4}[(x_i +x_{i+1})^2-(x_i - x_{i+1})^2]$ but what to do after that?
Here is an answer for the first quadratic form.
Two proofs :
a) A simple proof, inspired by this answer.
Let us work on this equivalent form:
$$Q=4x_1x_2+4x_2x_3+4x_3x_4+4x_4x_5+\cdots+4x_{2k-1}x_{2k}$$
Let us group the constituent terms of $Q$ under the following form (with the notable exception of the last term, left alone)
$$Q=4(x_1x_2+x_2x_3)+4(x_3x_4+x_4x_5)+\cdots+4x_{2k-1}x_{2k}$$
Let us factor the common terms variables :
$$Q=4(x_1+x_3)x_2+4(x_3+x_5)x_4+\cdots+4x_{2k-1}x_{2k}$$
Then using repeatedly identity $4ab=(a+b)^2-(a-b)^2$ :
$$Q=\{\color{red}{+}(x_1+x_3+x_2)^2\color{red}{-}(x_1+x_3-x_2)^2\}+\{\color{red}{+}(x_3+x_5+x_4)^2\color{red}{-}(x_3+x_5-x_4)^2\}+\cdots+\{\color{red}{+}(x_{2k-1}+x_{2k})^2\color{red}{-}(x_{2k-1}-x_{2k})^2\}$$
Therefore, each pair of terms between curly brackets $\{ \ \ \}$ "contributes" to a $\color{red}{+}$ and a $\color{red}{-}$ sign in the signature of the quadratic form. Previous expression having $2k$ terms, one can conclude that :
Remark : in a fully rigorous proof, one has to verify that all the linear forms inside the squares $(x_1+x_3+x_2), \ (x_1+x_3-x_2)$, etc. are independent ; I leave it to you...
b) Second proof based on eigenvalues. Though looking indirect compared to the previous one, this proof is rather efficient and permits to reach the signature without having to find a Gauss decomposition, which can be very tedious in some cases.
let us now consider the equivalent form :
$$2x_1x_2+2x_2x_3+....+2x_{n-1}x_{n} \ \ \text{with} \ \ n=2k$$
You should know that the signature of a quadratic form can be obtained by counting the number (+,-,z) of resp. positive, negative and zero eigenvalues of the associated matrix (https://en.wikipedia.org/wiki/Sylvester%27s_law_of_inertia).
Here the associated $n \times n$ matrix is :
$$\begin{pmatrix}0&1&0&0&\cdots&0&0\\ 1&0&1&0&\cdots&0&0\\ 0&1&0&1&\cdots&0&0\\ \cdots&\cdots&\cdots&\cdots&\cdots&\cdots&\cdots&\\ 0&0&0&0&\cdots&0&1\\ 0&0&0&0&\cdots&1&0 \end{pmatrix}$$
with a superdiagonal and a subdiagonal of $1$s.
It happens that this tridiagonal Toeplitz matrix has rather simple eigenvalues
$$2\cos(k\pi/(n+1)) \ \ for \ \ k=1,2,...n$$
(see "Toeplitz case" in https://en.wikipedia.org/wiki/Tridiagonal_matrix#Eigenvalues).
From there it is not difficult to conclude concerning the signs of these eigenvalues :
Had we been in the case $n=2k+1$, the signature would have been $(+,-,z)=(m,m,1)$ (presence of a single zero eigenvalue).
Remark: The explicit decomposition we have obtained in the first method is by no means unique. For example, in the particular case of
$$4(x_1x_2+x_2x_3+x_3x_4)$$
one has also the following decomposition
$$(x_1+x_2+x_3+x_4)^2-(-x_1+x_2-x_3+x_4)^2-(x_1+x_4)^2+(x_1-x_4)^2$$