Let $(e_1,\ldots,e_n)$ the standard basis of $\mathbb R^n$ and we consider the quadratic form $$\Phi(x)=\sum_{1\le i<j\le n}(x_i-x_j)^2$$ How I can find the matrix $A$ of this quadratic form?
My try: I know that we can determinate the coefficient $A_{ij}$ of $A$ using the coefficient of $x_ix_j$ of $\Phi$. Thanks for help.
Unless I'm misunderstanding something I think this is pretty straightforward:
$$\sum_{1\le i<j\le n}(x_i-x_j)^2=(x_1-x_2)^2+(x_1-x_3)^2+\ldots+(x_1-x_n)^2+\ldots+(x_{n-1}-x_n)^2=$$
$$=x_1^2-2x_1x_2+x_2^2+\ldots+x_1^2-2x_1x_n+x_n^2+\ldots+x_{n-1}^2-2x_{n-1}x_n+x_n^2=$$
$$(n-1)\left[x_1^2+\ldots+x_n^2\right]-2\sum_{1\le i<j\le n}x_ix_j\;\;\ldots\ldots$$