I was told that [Weil reciprocity](http://en.wikipedia.org/wiki/Weil_reciprocity_law) theorem (one has two meromorphic function $f,g$ on a complex curve $C$, so $\prod\limits\_{x\in C} g(x)^{ord\_xf}=\prod\limits\_{x\in C}f(x)^{ord\_xg} \ $ where $ord\_xf$ is the smallest degree in Taylor expansion of $f$ at $x$, product is taken only by points in divisors of $f,g$, we assume that these divisors are not intersected with each other) was introduced by Weil after thinking about quadratic reciprocity. Could you explain me the connection between them? 



Quadratic reciprocity and Weil reciprocity theorem
There are already good answers by quid and by Dustin Clausen [here](https://mathoverflow.net/questions/96290/weil-reciprocity-vs-artin-reciprocity). I thought, though, that I'd take the time to write out something more leisurely and expository. To get from Weil Reciprocity to Quadratic Reciprocity, one must make some things more general and some things less general, and there is a choice of which order to do these things in. I will first describe the less general route and will then make some comments about what happens when you make everything as general as possible.


First, we specialize from a general curve $C$ to $\mathbb{CP}^1$. Let $f$ and $g$ be polynomials in $\mathbb{C}[x]$, with roots at the disjoint sets $\alpha\_1$, ..., $\alpha\_a$ and $\beta\_1$, ..., $\beta\_b$ and with leading terms $f(x) = f\_{\infty} x^{a} + \cdots$ and $g(x) = g\_{\infty} x^b + \cdots$. Then Weil reciprocity says
$$\prod\_{j=1}^b f(\beta\_j) = \prod\_{i=1}^a g(\alpha\_i) \cdot (-1)^{ab}\ f\_{\infty}^{b} \ g\_{\infty}^{-a}. \quad (1)$$
(The extra terms on the right come because $f$ and $g$ both have poles at $\infty$; Francois discusses this in a comment above.)


Of course, $(1)$ is easy to prove directly by writing $f(x) = f\_{\infty} \prod (x-\alpha\_i)$ and $g(x) = g\_{\infty} \prod (x-\beta\_j)$. Also, this makes it clear that the above identity holds over any algebraically closed field.


We now generalize to a non-algebraically closed field $k$. Let $f$ and $g$ be relatively prime polynomials in $k[x]$. Let $f(x) = f\_{\infty} r\_1(x) r\_2(x) \cdots r\_c(x)$ be the factorization of $f$ into monic irreducibles. Similarly, let $g(x) = g\_{\infty} s\_1(x) \cdots s\_d(x)$. Let $K\_i$ be the field $k[x]/r\_i(x)$ and let $L\_j = k[x]/s\_j(x)$. For $u$ and $v \in k[x]$, I'll write $(u \bmod v)$ for the image of $u$ in $k[x]/v$. The generalization of $(1)$ is
$$\prod\_{j=1}^d N\_{L\_j/k}(f \bmod s\_j) = \prod\_{i=1}^c N\_{K\_i/k}(f \bmod r\_i) \cdot (-1)^{ab}\ f\_{\infty}^{b} \ g\_{\infty}^{-a}. \quad (2)$$


**Exercise 1:** See that, when $k$ is algebraically closed, $(2)$ specializes to $(1)$. **Exercise 2:** Deduce (2) from (1), by grouping together terms from $(1)$ over $k^{\mathrm{alg}}$.


We now specialize to the case $k = \mathbb{F}\_p$. The norm map from $\mathbb{F}\_{p^n}$ to $\mathbb{F}\_p$ is raising to the $(p^n-1)/(p-1)$ power. So $(2)$ becomes


$$\prod\_{j=1}^d (f \bmod s\_j)^{\frac{p^{\deg s\_j}-1}{p-1}} = \prod\_{i=1}^c (f \bmod r\_i)^{\frac{p^{\deg r\_i}-1}{p-1}} \cdot (-1)^{ab}\ f\_{\infty}^{b} \ g\_{\infty}^{-a}. \quad (3)$$


We specialize further to the case that $f$ and $g$ are irreducible to get
$$(f \bmod g)^{\frac{p^{b}-1}{p-1}} = (g \bmod f)^{\frac{p^{a}-1}{p-1}} \cdot (-1)^{ab}\ f\_{\infty}^{b} \ g\_{\infty}^{-a}. \quad (4)$$


Let $p$ be odd, and raise both sides to the $(p-1)/2$ to get
$$(f \bmod g)^{(p^b-1)/2} = (g \bmod f)^{(p^a-1)/2} \cdot (-1)^{ab(p-1)/2} \ f\_{\infty}^{b (p-1)/2} g\_{\infty}^{-a(p-1)/2}. \quad (5)$$


Recall [Euler's criterion](http://en.wikipedia.org/wiki/Euler%2527s_criterion): For $u \in \mathbb{F}\_p$, we have $u^{(p-1)/2} = \left( \frac{u}{p} \right)$. It has a generalization: For $u \in \mathbb{F}\_{p^n}$, the power $u^{(p^n-1)/2}$ is $\pm 1$ according to whether or not $u$ is square. So, defining the quadratic residue symbol in $\mathbb{F}\_p[x]$ in the obvious way, equation $(5)$ says
$$\left( \frac{f}{g} \right) = \left( \frac{g}{f} \right) \cdot (-1)^{ab(p-1)/2} \ \left( \frac{f\_{\infty}}{p} \right)^b \left( \frac{g\_{\infty}}{p} \right)^{-a}. \quad (6)$$


In short, $\left( \frac{f}{g} \right)$ is equal to $\left( \frac{g}{f} \right)$ up to some elementary terms, just like in quadratic reciprocity. One can rewrite the elementary correction terms to make them look more like the terms that show up in standard QR, but I'll leave this as is.


We can get more general statements by (a) not restricting ourselves to the case that $f$ and $g$ are irreducible (b) working with curves $C$ other than $\mathbb{A}^1$ (c) raising both sides of $(4)$ to the $(p-1)/g$ power for some other $g$ dividing $p-1$. I was going to write more about this, but I think it is long enough as it is.


