# Is this expression always non-negative?

Let

• $R = \mbox{diag} (r_1,\dots,r_n)$, where $r_1, \dots, r_n > 0$, be a (positive) diagonal matrix.

• $1_n \in \mathbb{R}^n$ denote the $n$-dimensional vector of all ones.

• $S$ be a matrix defined by $[S]_{jk}=\sin (\theta_{j}-\theta_k +\delta)$, where $[\theta_1, \dots, \theta_n]^\mathrm{T} \in \mathbb{R}^n$ and $\delta \in \mathbb R$.

Is it true that $$\left( 1^\mathrm{T}_n S^T R S 1_n -1^\mathrm{T}_n R S R^{-1} S 1_n \right) \geq 0$$ always holds?

My thoughts so far:

Since $S^T R S = (R^{1/2} S)^\mathrm{T} (R^{1/2}S)$, therefore it is positive semidefinite and so $1^\mathrm{T}_n S^T R S 1_n \geq 0$.

Also, I see that when $1^\mathrm{T}_n S^T R S 1_n = 0$, then $1^\mathrm{T}_n R S R^{-1} S 1_n =0$.

Consider $R = {\rm diag}(r, 1/r)$ and $\delta = \pi/4, \theta_1 = \pi/4, \theta_2 = 0$. Then $$S = \left[\begin{array}{cc} \sin(\theta_1 - \theta_1 + \delta) & \sin(\theta_1 - \theta_2 + \delta) \\ \sin(\theta_2 - \theta_1 + \delta) & \sin(\theta_2 - \theta_2 + \delta) \end{array}\right] = \left[ \begin{array}{cc} \sin(\pi/4) & \sin(\pi/2) \\ \sin(0) & \sin(\pi/4) \end{array}\right]= \left[\begin{matrix} 1/\sqrt 2 & 1 \\ 0 & 1/\sqrt 2\end{matrix}\right].$$ Now $$S^TRS = \left[\begin{matrix} r/\sqrt 2 & 0 \\ r & 1/(\sqrt 2 r)\end{matrix}\right]\left[\begin{matrix} 1/\sqrt 2 & 1 \\ 0 & 1/\sqrt 2\end{matrix}\right] = \left[\begin{array}{cc} r/2 & r/\sqrt 2 \\ r/\sqrt 2 & r + 1/(2r) \end{array}\right]$$ $$RSR^{1/2}S = \left[\begin{matrix} 1/\sqrt 2 & r^2 \\ 0 & 1/\sqrt 2\end{matrix}\right]\left[\begin{matrix} 1/\sqrt 2 & 1 \\ 0 & 1/\sqrt 2\end{matrix}\right]= \left[\begin{array}{cc} 1/2 & (1+r^2)/\sqrt 2 \\ 0 & 1/2 \end{array}\right]$$ and so $$1_2^TS^TRS1_2 = (3/2 + \sqrt 2)r + 1/(2r) \ \ \textrm{and} \ \ 1_2^TRSR^{-1}S1_2 = 1 + 1/\sqrt 2 + r^2/\sqrt 2.$$ Therefore, $$\lim_{r\rightarrow \infty} 1_2^TS^TRS1_2 - 1_2^TRSR^{-1}S1_2 = -\infty$$ and so your desired inequality does not hold in general.