# Matrix of cosecants appearing in equivariant index computations

In a computation of characters of certain representations of finite cyclic groups which appear as equivariant indices of Dirac operators (using the Atiyah-Bott fixed point formula, cf. [1, Theorem 8.35]), the following elementary problem emerged.

# Question 1

Let $$d > 2$$ be an integer and set $$n = \lceil\frac{d}{2}\rceil -1$$. For $$k \in \{1, \dotsc, n\}$$ with $$\gcd(k,d)=1$$, we set $$v_k = \begin{pmatrix} \csc^2(\frac{k \pi}{d})& \csc^2(\frac{2k \pi}{d}) &\cdots&\csc^2(\frac{n k\pi}{d}) \end{pmatrix} \in \mathbb{R}^n,$$ where $$\csc x = \frac{1}{\sin x}$$ denotes the cosecant. If $$\gcd(k,d) \neq 1$$, we let $$v_k = (0\ \cdots\ 1\ \cdots 0)$$ be the standard basis vector with entry $$1$$ at the $$k$$-th position.

Question: Do the vectors $$v_1, \dots, v_n$$ generate the vector space $$\mathbb{R}^n$$?

As this appears somewhat intimidating at first glance, let us simplify it to the case where $$d$$ is an odd prime number. Then it reads as follows:

# Question 2

Let $$p$$ be an odd prime number.

Question: Is the following $$\frac{p-1}{2} \times \frac{p-1}{2}$$-matrix invertible? $$M_p = \begin{pmatrix} \csc^2(\frac{\pi}{p}) & \csc^2(\frac{2\pi}{p}) &\cdots & \csc^2(\frac{(p-1)\pi}{2p}) \\ \csc^2(\frac{2\pi}{p}) & \csc^2(\frac{4\pi}{p}) &\cdots & \csc^2(\frac{2(p-1)\pi}{2p}) \\ \vdots & \vdots & \ddots & \vdots\\ \csc^2(\frac{(p-1)\pi}{2p}) & \csc^2(\frac{2(p-1)\pi}{2p}) &\cdots & \csc^2(\frac{(p-1)^2\pi}{4p}) \end{pmatrix}$$

# Discussion

The questions appears to be of a number-theoretic nature. Potentially relevant formulas involving the cosecant appear for instance in Cauchy's elementary solution to the classical Basel problem.

Moreover, numerical experiments suggest that

• Question 1 has an affirmative answer at least for $$d \leq 200$$.
• The determinant of the matrix in Question 2 is an integer times $$\frac{1}{\sqrt{p}}$$ if $$p \equiv 1 \mod 4$$, and an integer otherwise. This suggests a relation to quadratic reciprocity.

Spotting a concrete formula for the determinants from numerical computations is difficult, however, because the numbers grow very rapidly. But in [2, Lemma 3.1], the formula $$\prod_{j=1}^{\lfloor\frac{d}{2}\rfloor} \sin(\frac{j \pi}{d}) = \frac{\sqrt{d}}{2^{\frac{d-1}{2}}}$$ is provided which is reminiscent of our numerical observations. A more complicated formula involving quadratic reciprocity is provided in [2, Lemma 3.2].

All of this makes it plausible that it should be possible to derive a concrete formula for the determinants of the relevant matrices appearing in Question 1 and 2, but it remained elusive to me so far.

## References

[1] Atiyah, Michael F.; Bott, Raoul, A Lefschetz fixed point formula for elliptic complexes. II: Applications, Ann. Math. (2) 88, 451-491 (1968). ZBL0167.21703.

[2] Miatello, Roberto J.; Podestá, Ricardo A., Eta invariants and class numbers, Pure Appl. Math. Q. 5, No. 2, 729-753 (2009). ZBL1183.58021.

• Without thinking too much can Gershgorin help? – JP McCarthy May 18 at 10:54
• The tag "determinants" would be more useful than the current tags. – F. C. May 18 at 19:48
• Looks similar to the question mathoverflow.net/questions/321162 – F. C. May 18 at 19:51
• @JPMcCarthy Thanks a lot for this idea, this indeed solves the problem—see my answer below. – Rudolf Zeidler Sep 4 at 15:53
• Great to hear. I have found Gershgorin helpful on more than one occasion but this was really only a throwaway remark so I would see no problem with the reference to the suggestion going unreferenced in any future versions of the paper. – JP McCarthy Sep 4 at 16:50

As suggested in the comment of JP McCarthy, the Gershgorin circle theorem indeed leads to a solution:

Each row of the matrix $$M_p$$ is just a permutation of the first row and the entry $$\csc^2(\frac{\pi}{p})$$ occurs precisely once in each column. So we can permute the rows of $$M_p$$ to ensure that the entry $$\csc^2(\frac{\pi}{p})$$ appears on each diagonal position of the matrix. Denote the resulting matrix by $$\tilde{M}_p$$.

Next, we apply Gershgorin to $$\tilde{M}_p$$ to show that it is invertible. For this, it suffices to show that in each row the sum of the absolute values of the non-diagonal entries is strictly smaller than the absolute value of the diagonal entry. But since each row is just a permutation of the same vector of positive numbers and we have arranged the diagonal position, this just amounts to $$\sum_{l=2}^{n} \csc^2 \left( \frac{l \pi}{p} \right) < \csc^2\left(\frac{\pi}{p} \right),$$ where $$n = \frac{p-1}{2}$$. To prove the latter, we use the formula $$\sum_{l=1}^{d-1} \csc^2\left(\frac{l \pi}{d}\right) = \frac{d^2-1}{3},$$ which holds for any $$d \in \mathbb{N}$$, see the previously mentioned Wikipedia entry on the Basel problem or this Math Stack Exchange question. From this, we conclude \begin{align}\sum_{l=2}^n \csc^2\left(\frac{l \pi}{p} \right) &= \frac{p^2-1}{6} - \csc^2\left(\frac{\pi}{p}\right) \\ &<\frac{p^2}{6} - \csc^2\left(\frac{\pi}{p}\right)\\ &< 2 \frac{p^2}{\pi^2} - \csc^2\left(\frac{\pi}{p}\right)\\ &\leq 2 \csc^2\left(\frac{\pi}{p}\right)- \csc^2\left(\frac{\pi}{p}\right) = \csc^2\left(\frac{\pi}{p}\right), \end{align} where we used $$\frac{\pi^2}{2} < 6$$ for the second inequality and $$\frac{1}{x^2} \leq \csc^2(x)$$ for the third inequality.

This is what we needed to prove via Gershgorin that $$\tilde{M}_p$$ is invertible. Hence also $$M_p$$ is invertible. This answers Question 2 affirmatively.

The same argument also applies to Question 1. Just put the $$v_k$$ as row vectors into a matrix and reorder it in the same way as before putting $$\csc^2(\pi/d)$$ in the diagonal position whenever the row index $$k$$ has $$\gcd(k, d)=1$$. The additional unit vectors can also be appropriately reordered so that they do not disturb the Gershgorin argument. We have also written up the detailed argument for this on p.12-13 of arXiv:1712.03722v2.

Some sage code for experimental purposes:

def matr(p):
N = (p - 1) / 2
return matrix(N, N, lambda i,j: sin(pi/p*(i+1)*(j+1))**-2)


Resulting in

sage: [(p,matr(p).change_ring(QQbar).det()) for p in prime_range(3,19)]
[(3, 4/3),
(5, 7.155417527999327?),
(7, -128),
(11, 281600),
(13, 2.553445644401557?e7 + 0.?e-8*I),
(17, -5.4726330292?e11 + 0.?e1*I)]


Is this what you got ?

EDIT

One can see a factor $$2^{p-1}$$ and $$p^{(p-7)/4}$$, for example one gets

p=3 : 2^2 * 3^(-1)
p=5 : 2^4 * 5^(-1/2)
p=7 : -1 * 2^7 * 7^0
p=11 : 2^10 * 5^2 * 11^1
p=13 : 2^12 * 7 * 13^(3/2) * 19
p=17 : -1 * 2^21 * 3 * 17^(5/2) * 73
p=19 : 2^18 * 3^3 * 5 * 19^3 * 487
p=23 : -1 * 2^23 * 11^2 * 23^4 * 37181
p=29 : 2^34 * 3 * 5 * 7^2 * 29^(11/2) * 43 * 17837
p=31 : -1 * 2^35 * 5^3 * 7 * 11 * 31^6 * 2302381
p=37 : 2^36 * 3^3 * 5 * 7 * 19^2 * 37^(17/2) * 73 * 577 * 17209


(now including the square root factor, so that the power of $$p$$ is more regular)

I have found a faster way to compute the determinant, without the main power of 2:

p=43 : 2^2 * 7^2 * 11 * 19 * 29 * 43^9 * 463 * 1051 * 416532733
p=59 : 5 * 29^2 * 59^14 * 9988553613691393812358794271


EDIT

It seems that the square $$M_p^2$$ of the given matrix $$M_p$$ is made of positive integers. And that $$M_p$$ has an eigenvector $$(1,1,1,1,...)$$ with eigenvalue $$(p^2-1)/24$$. And that all the lines of $$M_p^2$$ are permutations of the same sequence of integers.

EDIT

The same matrix with $$1/\cos^2$$ instead of $$1/\sin^2$$ seems to have very similar properties.

• Yes, that's what I got. The factorizations are the integers you get after (if necessary) multiplying by $\sqrt{p}$, right? – Rudolf Zeidler May 17 at 20:14
• Yes, but sadly I am not able to go further on my old laptop. – F. C. May 17 at 20:24
• In fact, the diagonal entries of $M_p^2$ are all equal to $\sum_{j=1}^{\frac{p-1}{2}} \csc(\frac{j\pi}{p})^4 = \frac{1}{90} (p^4 + 10 p^2-11)$. This can be proved along the same lines as in the linked Wikipedia entry on the Basel problem. – Rudolf Zeidler May 21 at 16:12