Modular geometry: The parabolas of quadratic residues modulo $p$

259 Views Asked by At

[For using the available space better, I rotated the function graphs by 90 degrees.]


For the quadratic function $f_1(x) = x^2$ (with $x \in \mathbb{R}$) there is only one parabola all integer points $(k,k^2)$ lie on:

enter image description here

But for the quadratic residual function $f^p(x) = x^2\ \%\ p$ — i.e. the quadratic residue of $x$ modulo $p$ — there are many.

Let $p=11$. For each $0 < n < p$ consider the parabola $f^p_n(x) \sim x^2$ with $f^p_n(n)=n^2\ \%\ p$, i.e. the parabola with vertex $(0,0)$ on which the point $(n,n^2\ \%\ p)$ lies:

enter image description here

Equivalently — because $k^2\ \%\ p = (p-k)^2\ \%\ p$ — one may consider the parabola $f^p_n(x) \sim (p-x)^2$, i.e. the parabola with vertex $(p,0)$ on which the point $(n,n^2\ \%\ p)$ lies:

enter image description here

The important fact is, that when $p$ is prime all points $(k,k^2)$ lie on $f^p_n(x)$ modulo $p$ for all $0 < n < p$.

Lying on $f^p_n$ modulo $p$ means lying on $f^p_n$ when bending the square $[0,p]\times [0,p]$ to a torus, i.e. identifying its opposite sides. Here you see that all $(k,k^2)$ lie on $f^{11}_1$ modulo $11$, resp. on $f^{11}_4$ and $f^{11}_{10}$:

enter image description here

Two questions arise:

  1. How many different parabolas $f^p_n$ are there for a given $p$?
    Note that $f^p_n = f^p_1$ for $n^2 < p$.
    For $p=13$ one finds that $f^{13}_4 = f^{13}_8$: enter image description here

  2. How do you tell the grid cell in which the parabola $f^p_n$ actually "hits" $(k,k^2)$ modulo $p$, i.e. after how many windings around the torus?
    For $f^p_1$ and $k^2 < p$ it's the cell $(1,1)$ (top left), obviously.
    For $f^{p}_1$ and $k=p-1$ it's the cell $(1,p-1)$.
    For $f^{p}_{p-1}$ and $k=1$ it's the cell $(p-1,p-1)$.
    For $f^{11}_4$ and $k=7$, resp. $f^{11}_5$ and $k=6$ you will find, that the grid cell isn't displayed above (too far to the right). But one may try to determine it by looking at the torus chart, e.g. for $f^{11}_4$: enter image description here
    Counting lines in the chart for $f^{11}_{4}$ reveals that for the "hit" cell $(i,j)$ of $k=7$ it holds that $i+j \approx 60$. The same works for the "hit" cell $(i,j)$ of $k=1$ for $f^{11}_{10}$ (see above) with $i+j = 20$.


To answer at least partially the first question one may define an equivalence relation $\sim_p$ between numbers $n_1,n_2 < p$:

$$n_1 \sim_p n_2\ \ \text{ iff }\ \ \ \frac{n_1^2\ \%\ p}{n_1^2} = \frac{n_2^2\ \%\ p}{n_2^2}$$

When $n_1 \sim_p n_2$ both parabolas $f^p_{n_i}$ have the same slope, and thus are identical.

So the first question reads:

How many equivalence classes modulo $\sim_p$ are there?