Convex polygon inscribed in a circle with vertices that create matrix. Prove that the rank of this matrix is less or equal 2. Consider a convex polygon inscribed in a circle with vertices $P_1$, ..., $P_n, \ n \ge 3$. Let $A$ be the matrix $n \times n$ such that 
$\begin{equation}
  a_{ij} =
    \begin{cases}
      |P_iP_j| & \text{if $i > j$,}\\
      -|P_iP_j| & \text{if $i \leq j$.}\\
    \end{cases} 
\end{equation} $
Prove that $rank(A) \leq 2. $ 
Obviously:
$\begin{equation}
  A =
\begin{bmatrix}0 & -|P_1P_2| & ... & -|P_1P_n|\\|P_2P_1| & 0 & ... & -|P_2P_n|\\ ... & ... & ... & ...\\|P_nP_1| & |P_nP_2| & ... & 0 \end{bmatrix}
\end{equation} $
where every element on the left of diagonal is positive and on the right is negative. Don't really know how to continue. Any hints? 
 A: Put the origin $O$ of a coordinate system at the center of the circle that has radius $r$. Choose the direction of the $x$-axis such that there exist angles $0 < \alpha_1 < \alpha_2 <\ldots <\alpha_n < 2\pi$ such that $P_i = (r\cos(\alpha_i),r\sin(\alpha_i))$.
The triangle $OP_iP_j$ is isoscales, so if $M$ is the midpoint of $P_iP_j$, then triangle $OMP_i$ is right-angled at $M$. Since $OM$ is also the angle bisector of the angle at $O$ in the triangle $OP_iP_j$, we get
$$\left\lvert\sin\left({\alpha_j-\alpha_i \over 2}\right)\right\rvert = \frac{\lvert MP_i\rvert}r$$
and thus 
$$ \lvert P_iP_j\rvert = 2 \lvert MP_j\rvert = 2r\left\lvert\sin\left({\alpha_j-\alpha_i \over 2}\right)\right\rvert$$
Let's take a closer look at the sign of the trigonometric function here. We have $-2\pi < \alpha_j - \alpha_i < 2\pi$ and hence $-\pi < \frac{\alpha_j - \alpha_i}2 < \pi$. That means the $\sin$-function is positive/zero/negative exactly when $\alpha_j - \alpha_i$ is positive/zero/negative. By the choice of the $\alpha_k$ to be increasing, we have that $\alpha_j - \alpha_i$ is positive/zero/negative when $j>i/j=i/j<i$. 
That means the general term $(a_{ij})$ of our matrix $A$ is
$$a_{ij}=2r\sin\left({\alpha_i-\alpha_j \over 2}\right)$$
For $i=j$ that term is $0$ (as it should be), for $i > j$ is is positive (as it should be) and for $i < j$ it is negative.
Not we write every row as a linear combination of the first 2 rows, which means that  rank$(A) \le 2$. Note that by the comment of Arnaud Mortier under the question we actually have rank$(A) = 2$. A little experimentation with $n=3$ shows that to get row $i$, you have to mulitply row $1$ with 
$$-\sin\left({\alpha_2-\alpha_i \over 2}\right) \over \sin\left({\alpha_1-\alpha_2 \over 2}\right)$$
and row $2$ with 
$$\sin\left({\alpha_1-\alpha_i \over 2}\right) \over \sin\left({\alpha_1-\alpha_2 \over 2}\right)$$
and add the results up. To prove that this leads to the correct result, we have to prove the following identity:
$$a_{ij}\sin\left({\alpha_1-\alpha_2 \over 2}\right) = -a_{1j}\sin\left({\alpha_2-\alpha_i \over 2}\right) + a_{2j}\sin\left({\alpha_1-\alpha_i \over 2}\right).$$
Using the formulas above and removing the common factor $2r$ on both sides, it needs to be proved that
$$\sin\left({\alpha_i-\alpha_j \over 2}\right)\sin\left({\alpha_1-\alpha_2 \over 2}\right) = -\sin\left({\alpha_1-\alpha_j \over 2}\right)\sin\left({\alpha_2-\alpha_i \over 2}\right) + \sin\left({\alpha_2-\alpha_j \over 2}\right)\sin\left({\alpha_1-\alpha_i \over 2}\right).$$
There might by multiple ways to prove this, I choose to apply the following formula for all 3 products: 
$$\sin(X)\sin(Y)=\frac12(\cos(X-Y) - \cos(X+Y))$$
that can be easily proved by using the addition theorems on the right side. Using this on the equality to prove yields to (equivalently), after removing the common $\frac12$ in both sides:
$$ \begin{eqnarray}{}
\cos\left(\color{red}{\alpha_i-\alpha_j-\alpha_1+\alpha_2\over 2}\right) - \cos\left(\color{blue}{\alpha_i-\alpha_j+\alpha_1-\alpha_2\over 2}\right) = \\ 
-\cos\left(\color{blue}{\alpha_1-\alpha_j-\alpha_2+\alpha_i\over 2}\right) + \cos\left(\color{orange}{\alpha_1-\alpha_j+\alpha_2-\alpha_i\over 2}\right) + \\
\cos\left(\color{red}{\alpha_2-\alpha_j-\alpha_1+\alpha_i\over 2}\right) - \cos\left(\color{orange}{\alpha_2-\alpha_j+\alpha_1-\alpha_i\over 2}\right)
\end{eqnarray}
$$
I've marked with the same colors the terms that are equal on each side (red, blue) and that cancel each other on the RHS (orange). This concludes the proof of the proposition.
