Let $G$ be a $d$-regular graph. Let $d= \lambda\_1 \ge \lambda\_2 \ge \dots \ge \lambda\_n \ge -d $ be the eigenvalues of the adjacency matrix of $G$, and set $\lambda = \max (|\lambda\_2| , |\lambda\_n|) $ We say that $G$ is a *Ramanujan graph* if $\lambda \le 2 \sqrt{d-1}$.


[According to Wikipedia](https://en.wikipedia.org/wiki/Ramanujan_graph), if $\mathbb{F}\_q$ is a finite field of order $q$, and $S= \{ f(x) : x\in \mathbb{F}\_q \}$ is the image of a degree 2 or degree 3 polynomial $f(x)$ over $\mathbb{F}\_q$ such that $S = -S$, then the Cayley graph for $\mathbb{F}\_q$ with generators $S$ is a Ramanujan graph. Is there a standard reference for this fact?


I am wondering about more general formulations, especially to multivariate polynomials, and zero sets of polynomials rather than images.


The specific example I have in mind is the following. Let $p$ be a prime and set $S= \{ (x,y) \in \mathbb{F}\_p^2 : x^2 + y^2 = 1 \}$. It seems that the Cayley graph on $\mathbb{F}\_p^2$ with generators $S$ is Ramanujan. A number theorist friend sketched a proof of this for me recently. The proof involved classical Weil estimates for Kloosterman sums in the case $p \cong 1 \pmod{4}$ and base change to reduce to the classical case when $p \cong 3 \pmod{4}$. Comment: the degree of this graph is $d=p-1$ when $p \cong 1 \pmod{4}$, and $d=p+1$ when $p \cong 3 \pmod{4}$.


I am wondering if this follows directly from more general constructions for Ramanujan graphs that are well known to experts (i.e. Cayley graphs made from varieties over finite fields), or if this example is new.


Update: it turns out this specific example is already known. I added an answer below. I am still wondering about a reference that explains how to get Ramanujan graphs from Cayley graphs over finite fields (and suitable polynomials), as in the statement from Wikipedia.



Ramanujan graphs from varieties over finite fields
The assumptions mean that the eigenvalues of the Cayley graph are of the form $\sum\_{x\in S} \psi (x)$ for $\psi \colon \mathbb F\_q\to \mathbb C^\times$ an additive character, which is $\sum\_{x\in \mathbb F\_q}\psi(f(x))$ since $S$ is taken with multiplicity.


For sums of this type, we have the bound
$$\left|\sum\_{x\in \mathbb F\_q}\psi(f(x))\right| \leq (\deg f-1) \sqrt{q}$$ over any finite field $\mathbb F\_q$ of characteristic greater than $\deg f$, for any nontrivial character $\psi$.


This bound makes the Cayley graph Ramanujan when $\deg f = 2$ or $3$.


This bound is due to Gauss in the degree $2$ case, and is due to Weil in the higher degree case (in [the same paper that the bound for Kloosterman sums is from](https://www.jstor.org/stable/88420), equation (5), although the translation from that reference is annoying).


