Linear independence for functions on Z/m Let $p$ be prime and consider the functions $f_k:(\mathbb Z/p)\backslash\{0\}\rightarrow\mathbb R$ defined by $f_k(x)=\csc^2\left(\frac{k\pi x}{p}\right)$. 
Question: How might I show that the functions $f_k$ are linearly independent over $\mathbb C$ for $1\le k\le\frac{p-1}{2}$? 
(I'm not 100% confident that they are independent, but it seems like they should be, and I've checked it with Mathematica for small $p$.) 
One remark: $f_k$ is proportional to $\frac{1}{\chi_k+\chi_{-k}-2}$, where $\chi_k:\mathbb Z/p\rightarrow\mathbb C$ is the character defined by $1\mapsto e^{2\pi i k/p}$. I tried to show independence using the fact that the $\chi_k$ are independent for $1\le k\le p-1$, but things got complicated. Maybe there is a better way?
Thanks in advance! 
 A: Here is a sketch of the approach I came up with. Not sure it will be helpful to anyone else, but I'll post it anyway. 
Let $q=\frac{p-1}{2}$, and consider the $q\times q$ matrix $A_{k,\ell}=f_k(\ell)$ for $1\le k,\ell\le q$. It is enough to show that $A$ is invertible. 
Define another $q\times q$ matrix B as follows. Consider a homomorphism $\phi:(\mathbb Z/p)^\times\simeq\mathbb Z/(p-1)\rightarrow\mathbb Z/q$. For $0\le i,j\le q-1$, define $B_{ij}$ by $\csc^2\left(\frac{\pi}{p}\cdot y\right)$, where $\phi(y)=i+j$. This is well defined because $\csc^2(x)$ is an even function. 
Now observe. 


*

*$A$ and $B$ are the same matrix, up to permuting rows and columns. Thus it suffices to show that $\det(B)\neq0$.

*$B$ is a circulant matrix, up to permuting rows and columns. This is easy to see because $B$ is obtained by taking the multiplication table for $\mathbb Z/q$ and applying a fixed function to each entry. (The multiplication table of a cyclic group is circulant up to permuting the rows.)
Now the determinant of a circulant matrix is easily computed (see the link above). The determinant is a product of terms of the form $c_0+c_1\omega^j+c_2\omega^{2j}+\cdots+c_{q-1}\omega^{(q-1)j}$, where $\omega=e^{2\pi i/q}$, $0\le j\le q-1$, and the $c_i$ are in bijection with $\csc^2\left(\frac{k\pi}{p}\right)$, $1\le k\le q$. 
If $\det(B)=0$, then $\omega^j$ is a solution to the polynomial $P(x)=c_0+c_1x+\cdots+c_{q-1}x^{q-1}$ for some $j$. This is possible if and only if $c_0=c_1=\cdots=c_{q-1}$, which is not the case. 
