TITLE: How to show determinant of a specific matrix is nonnegative
QUESTION [13 upvotes]: How to show that
$$\det A= \det \begin{pmatrix}\cos\frac{\pi}{n}&-\frac{\cos\theta_1}{2}&0&0&\cdots&0&-\frac{\cos\theta_n}{2}
\\-\frac{\cos\theta_1}{2}&\cos\frac{\pi}{n}&-\frac{\cos\theta_2}{2}&0&0&\cdots&0\\
0&-\frac{\cos\theta_2}{2}&\cos\frac{\pi}{n}&-\frac{\cos\theta_3}{2}&0&\cdots&0\\
\vdots&\vdots&-\frac{\cos\theta_3}{2}&\ddots&\ddots&\vdots&\vdots\\\vdots&\vdots&\vdots&\ddots&\ddots&\ddots&\vdots\\ \vdots&\vdots&\vdots&\vdots&\ddots&\ddots&-\frac{\cos\theta_{n-1}}{2}\\
-\frac{\cos\theta_n}{2}&0&\cdots&0&0&-\frac{\cos\theta_{n-1}}{2}&\cos\frac{\pi}{n} \end{pmatrix} \geq 0,
$$
  where $\sum\limits_{i=1}^n\theta_i=\pi$, $0<\theta_i<\frac{\pi}{2}, i=1,\dots,n$, and $n\ge 3$?

REPLY [8 votes]: It was pointed out in the comments that you can interpret the matrix as a bilinear form and obtain the inequality
$$ x^T A x = \cos(\pi/N) \sum_{i=1}^N x_i^2 - \sum_{i=1}^N x_i x_{i+1} \cos\theta_i \geq 0 .$$
So, if this bilinear form is positive semidefinite, $x^T A x \geq 0$, then all eigenvalues are nonnegative and the determinant must also be nonnegative.

To show that, we rewrite the inequality by shuffling the terms a bit and adding $\sum x_i^2$ on both sides:
$$ \sum \left((x_i^2+x_{i+1}^2)/2 - x_i x_{i+1} \cos\theta_i \right) \geq (1-\cos (\pi/N)) \sum x_i^2 .$$
The left-hand side looks suspiciously like the cosine formula for the side of a triangle. In particular, this looks like a set of vectors in the complex plane that emanate from the origin and are separated by angles $\theta_1,\theta_2,\dots$ and so on. This makes a lot of sense since the angles are meant to add up to $\pi$.
We can make this geometric insight explicit by defining complex numbers $z_i = x_i e^{\sum_{k=1}^{j-1} \theta_j}$ and $z_{N+1} = -z_1$. The inequality becomes
$$ 1/2 \sum |z_{i+1}-z_i|^2 \geq (1-\cos(\pi/N)) \sum |z_i|^2 .$$
This looks a lot easier, because the angles are finally gone. That said, we are now dealing with complex Hilbert spaces, but they tend to be easier anyway.

In particular, let $P$ be the "permutation operator"
$$ P (z_1,z_2,\dots,z_n)^T := (z_2,z_3,\dots,z_n,-z_1)^T .$$
It is easy to check that this is a unitary operator, $P^\dagger=P^{-1}$. The inequality can be written as
$$ ||(P-1)z||^2 \geq (2-2\cos(\pi/N)) ||z||^2 ,$$
We can prove this by showing that the eigenvalues $\lambda_k$ of the operator $P-1$ are bounded from below by $|\lambda_k|^2 \geq 2-2\cos(\pi/N)$. After all, the operator $P-1$ is normal, so we can apply the spectral theorem.
Calculating the eigenvalues of the operator $P$ is easy, because repeated application of $P$ obviously yields $P^N=-1$, but this must already be the minimal polynomial. Hence, the eigenvalues of $P-1$ are
$$ \lambda_k = e^{i\pi k/N}-1, \quad 0 \leq k \leq 2N, k \text{ odd} .$$
Clearly, the case $k=1$ has the smallest magnitude and we have
$$ |\lambda_1|^2 = \sin^2(\pi/N) + (1-\cos^2(\pi/N)) = 2-2\cos(\pi/N) .$$
This proves the inequality. $\square$