What is the connection between Weil's character bound and Riemann Hypothesis over finite fields Weil's character bound states that: Let $\mathbb{F}_{q}$ be a finite field of size $q$. Let $\chi$ be a multiplicative character of order $m$. Let $f(x)$ be a polynomial of degree $d$ such that $f(x) \neq c . g(x)^{m}$ for any $c \in \mathbb{F}_{q}$ and $g(x) \in \mathbb{F}_{q}[x]$. Then 
$$ \left| \sum_{x \in \mathbb{F}_{q}} \chi(f(x))  \right| \leq (d-1)\sqrt{q} $$
The Riemann Hypothesis over finite fields, or rather the Hasse-Weil bound is concerned with the number of rational points on curves. To put it simply, again suppose we have a finite field $\mathbb{F}_{q}$ and an absolutely irreducible polynomial $h(x,y)$ of total degree $d$ over $\mathbb{F}_{q}$, (a simple version of) it states that 
$$ \left| N - q \right| \leq O(d^2) \sqrt{q} $$
where $N$ is the number of rational points on the variety defined by the polynomial $h$ i.e.
$$N = \left|\left\lbrace (a,b) \in \mathbb{F}_{q}^2 : h(a,b)=0 \right\rbrace \right|$$
Now if $\chi$ is the quadratic character defined by $\chi(a) = (\frac{a}{q})$ where $(\frac{a}{q})$ is the Legendre symbol (whether $a$ is quadratic residues or not modulo $q$), then since $\chi$ takes only 1/-1 values, it is easy to see that the number of rational points on the curve $y^2 - f(x) = 0$ can be used to count the sum $\left| \sum_{x \in \mathbb{F}_{q}} \chi(f(x))  \right|$.
Most references simply state that the quadratic character bound, and the general character sum bound are special cases of counting points on varieties and the Riemann hypothesis.
But how are the two results related in the general case, where $\chi$ no longer takes only 1/-1 values? Is there a simple correspondence like in the quadratic case? Thanks.
 A: This can be explained in a pretty elementary way. 
For $0 \leq j < m$, let $\gamma_j$ be the character sum
$$\gamma_j := \sum_{x \in \mathbb{F}_q} \chi^j(f(x)).$$
Let $X$ be the curve $y^m = f(x)$. Note that the number of points on $X$ over $\mathbb{F}_p$ is
$$\# X(\mathbb{F}_q) = \sum_{x \in \mathbb{F}_q} \# \{m\mbox{-th roots of f(x)} \}= \sum_{x \in \mathbb{F}_q} \sum_{j=0}^{m-1} \chi^j(f(x)) =  \sum_{j=0}^{m-1} \gamma_j$$
Let $g$ be a primitive element in $\mathbb{F}_q$, so $\chi(g)$ is a primitive $m$-th root of unity. Define $\zeta = \chi(g)$. For $0 \leq i < m$, let $X_i$ be the curve $y^m = g^i f(x)$. Then
$$\# X_i(\mathbb{F}_q) = \sum_{x \in \mathbb{F}_q} \sum_{j=0}^{m-1} \chi^j(g^i f(x)) =  \sum_{j=0}^{m-1} \zeta^{ij} \gamma_j.$$
So the character sums and the number of points on the curves $X_i(\mathbb{F}_q)$ are related by the finite Fourier transform. The Riemann hypothesis $\# X_i(\mathbb{F}_q) = q + O(\sqrt{q})$ transforms to $\gamma_0 = q$ and $\gamma_j = O(\sqrt{q})$ for $j \neq 0$.
