# Proof for a positive semi-definite matrix

Consider a vector of length $m$($m\geq 3$): $a=[a_1,...,a_m]^T$, where $a_i\neq a_j, \forall 1\leq i<j\leq m$. And consider the matrix $A\in R^{m\times m}$, whose entries are $[A]_{ij}=(a_i−a_j)^2$. My simulation suggests that $A$ seems to be positive semi-definite, and I wonder if there is a proof or disproof.

BTW, one verifiable property of $A$ is that its rank is 3. Moreover, for the positive eigenvalues of $A$: $\lambda_1\geq\lambda_2\geq\lambda_3$,we have $\lambda_1=\lambda_2+\lambda_3$, which also requires a proof.

We have \begin{align} x^TAx & = \sum_{i,j=1}^n x_ix_j(a_i-a_j)^2 = \sum_{i=1}^nx_ia_i^2 \sum_{j=1}^nx_j + \sum_{j=1}^nx_ja_j^2 \sum_{i=1}^nx_i -2\left(\sum_{i=1}^na_ix_i \right)^2\\ & = 2\left(\sum_{i=1}^nx_ia_i^2 \cdot \sum_{j=1}^nx_j - \left(\sum_{i=1}^na_ix_i\right)^2\right) \end{align} Now using Cauchy–Schwarz inequality, for the vectors $\vec{p} = \begin{bmatrix} \sqrt{x_1}a_1 & \sqrt{x_2}a_2 & \cdots & \sqrt{x_n}a_n\end{bmatrix}$ and $\vec{q} = \begin{bmatrix} \overline{\sqrt{x_1}} & \overline{\sqrt{x_2}} & \cdots & \overline{\sqrt{x_n}}\end{bmatrix}$ we obtain that $x^TAx \geq 0$.
• Thank you for your answer! I didn't realize to use Cauchy-Schwarz inequality for complex vectors when $x_i<0$ before your answer. And happy holiday! – SoftSail Dec 24 '15 at 10:11
• And how about the eigenvalue result, i.e. $\lambda_1 = \lambda_2+\lambda_3$? Thanks! – SoftSail Dec 24 '15 at 10:15
• I realize a problem that $<p,p>$ is not $\sum_{i=1}^n x_i a_i^2$ but $\sum_{i=1}^n| x_i a_i^2|$ instead. – SoftSail Dec 27 '15 at 10:05