# Kronecker symbol

In number theory, the Kronecker symbol, written as $\left({\frac {a}{n}}\right)$ or $(a|n)$, is a generalization of the Jacobi symbol to all integers $n$. It was introduced by Leopold Kronecker (1885, page 770).

## Definition

Let $n$ be a non-zero integer, with prime factorization
    $n=u\cdot p_{1}^{e_{1}}\cdots p_{k}^{e_{k}},$
where $u$ is a unit (i.e., $u=\pm 1$), and the $p_{i}$ are primes. Let $a$ be an integer. The Kronecker symbol $\left({\frac {a}{n}}\right)$ is defined by
    $\left({\frac {a}{n}}\right):=\left({\frac {a}{u}}\right)\prod _{i=1}^{k}\left({\frac {a}{p_{i}}}\right)^{e_{i}}.$
For odd $p_{i}$, the number $\left({\frac {a}{p_{i}}}\right)$ is simply the usual Legendre symbol. This leaves the case when $p_{i}=2$. We define $\left({\frac {a}{2}}\right)$ by
    $\left({\frac {a}{2}}\right):={\begin{cases}0&{\mbox{if }}a{\mbox{ is even,}}\\1&{\mbox{if }}a\equiv \pm 1{\pmod {8}},\\-1&{\mbox{if }}a\equiv \pm 3{\pmod {8}}.\end{cases}}$
Since it extends the Jacobi symbol, the quantity $\left({\frac {a}{u}}\right)$ is simply $1$ when $u=1$. When $u=-1$, we define it by
    $\left({\frac {a}{-1}}\right):={\begin{cases}-1&{\mbox{if }}a<0,\\1&{\mbox{if }}a\geq 0.\end{cases}}$
Finally, we put
    $\left({\frac {a}{0}}\right):={\begin{cases}1&{\text{if }}a=\pm 1,\\0&{\text{otherwise.}}\end{cases}}$
These extensions suffice to define the Kronecker symbol for all integer values $a,n$.
Some authors only define the Kronecker symbol for more restricted values; for example, $a$ congruent to $0,1{\bmod {4}}$ and $n>0$.

## Table of values

The following is a table of values of Kronecker symbol $\left({\frac {k}{n}}\right)$ with 1 ≤ n, k ≤ 30.
| kn | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 2 | 1 | 0 | −1 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | −1 | 0 |
| 3 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 |
| 4 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
| 5 | 1 | −1 | −1 | 1 | 0 | 1 | −1 | −1 | 1 | 0 | 1 | −1 | −1 | 1 | 0 | 1 | −1 | −1 | 1 | 0 | 1 | −1 | −1 | 1 | 0 | 1 | −1 | −1 | 1 | 0 |
| 6 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | −1 | 0 | 0 | 0 | −1 | 0 | −1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
| 7 | 1 | 1 | −1 | 1 | −1 | −1 | 0 | 1 | 1 | −1 | 1 | −1 | −1 | 0 | 1 | 1 | −1 | 1 | −1 | −1 | 0 | 1 | 1 | −1 | 1 | −1 | −1 | 0 | 1 | 1 |
| 8 | 1 | 0 | −1 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | −1 | 0 |
| 9 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 |
| 10 | 1 | 0 | 1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | −1 | 0 | −1 | 0 | −1 | 0 | −1 | 0 | 0 | 0 | 1 | 0 | −1 | 0 |
| 11 | 1 | −1 | 1 | 1 | 1 | −1 | −1 | −1 | 1 | −1 | 0 | 1 | −1 | 1 | 1 | 1 | −1 | −1 | −1 | 1 | −1 | 0 | 1 | −1 | 1 | 1 | 1 | −1 | −1 | −1 |
| 12 | 1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | −1 | 0 |
| 13 | 1 | −1 | 1 | 1 | −1 | −1 | −1 | −1 | 1 | 1 | −1 | 1 | 0 | 1 | −1 | 1 | 1 | −1 | −1 | −1 | −1 | 1 | 1 | −1 | 1 | 0 | 1 | −1 | 1 | 1 |
| 14 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 |
| 15 | 1 | 1 | 0 | 1 | 0 | 0 | −1 | 1 | 0 | 0 | −1 | 0 | −1 | −1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | −1 | 1 | 0 | 0 | −1 | 0 | −1 | −1 | 0 |
| 16 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
| 17 | 1 | 1 | −1 | 1 | −1 | −1 | −1 | 1 | 1 | −1 | −1 | −1 | 1 | −1 | 1 | 1 | 0 | 1 | 1 | −1 | 1 | −1 | −1 | −1 | 1 | 1 | −1 | −1 | −1 | 1 |
| 18 | 1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | −1 | 0 | −1 | 0 | 0 | 0 | 1 | 0 | −1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | −1 | 0 |
| 19 | 1 | −1 | −1 | 1 | 1 | 1 | 1 | −1 | 1 | −1 | 1 | −1 | −1 | −1 | −1 | 1 | 1 | −1 | 0 | 1 | −1 | −1 | 1 | 1 | 1 | 1 | −1 | 1 | −1 | 1 |
| 20 | 1 | 0 | −1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 |
| 21 | 1 | −1 | 0 | 1 | 1 | 0 | 0 | −1 | 0 | −1 | −1 | 0 | −1 | 0 | 0 | 1 | 1 | 0 | −1 | 1 | 0 | 1 | −1 | 0 | 1 | 1 | 0 | 0 | −1 | 0 |
| 22 | 1 | 0 | −1 | 0 | −1 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | 1 | 0 |
| 23 | 1 | 1 | 1 | 1 | −1 | 1 | −1 | 1 | 1 | −1 | −1 | 1 | 1 | −1 | −1 | 1 | −1 | 1 | −1 | −1 | −1 | −1 | 0 | 1 | 1 | 1 | 1 | −1 | 1 | −1 |
| 24 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | −1 | 0 | 0 | 0 | −1 | 0 | −1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
| 25 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 |
| 26 | 1 | 0 | −1 | 0 | 1 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | −1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | −1 | 0 |
| 27 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 | 1 | −1 | 0 |
| 28 | 1 | 0 | −1 | 0 | −1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | 1 | 0 | −1 | 0 | −1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | −1 | 0 | 1 | 0 |
| 29 | 1 | −1 | −1 | 1 | 1 | 1 | 1 | −1 | 1 | −1 | −1 | −1 | 1 | −1 | −1 | 1 | −1 | −1 | −1 | 1 | −1 | 1 | 1 | 1 | 1 | −1 | −1 | 1 | 0 | 1 |
| 30 | 1 | 0 | 0 | 0 | 0 | 0 | −1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | −1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |

## Properties

The Kronecker symbol shares many basic properties of the Jacobi symbol, under certain restrictions:
* $\left({\tfrac {a}{n}}\right)=\pm 1$ if $\gcd(a,n)=1$, otherwise $\left({\tfrac {a}{n}}\right)=0$.
* $\left({\tfrac {ab}{n}}\right)=\left({\tfrac {a}{n}}\right)\left({\tfrac {b}{n}}\right)$ unless $n=-1$, one of $a,b$ is zero and the other one is negative.
* $\left({\tfrac {a}{mn}}\right)=\left({\tfrac {a}{m}}\right)\left({\tfrac {a}{n}}\right)$ unless $a=-1$, one of $m,n$ is zero and the other one has odd part (definition below) congruent to $3{\bmod {4}}$.
* For $n>0$, we have $\left({\tfrac {a}{n}}\right)=\left({\tfrac {b}{n}}\right)$ whenever $a\equiv b{\bmod {\begin{cases}4n,&n\equiv 2{\pmod {4}},\\n&{\text{otherwise.}}\end{cases}}}$ If additionally $a,b$ have the same sign, the same also holds for $n<0$.
* For $a\not \equiv 3{\pmod {4}}$, $a\neq 0$, we have $\left({\tfrac {a}{m}}\right)=\left({\tfrac {a}{n}}\right)$ whenever $m\equiv n{\bmod {\begin{cases}4|a|,&a\equiv 2{\pmod {4}},\\|a|&{\text{otherwise.}}\end{cases}}}$
On the other hand, the Kronecker symbol does not have the same connection to quadratic residues as the Jacobi symbol. In particular, the Kronecker symbol $\left({\tfrac {a}{n}}\right)$ for $n\equiv 2{\pmod {4}}$ can take values independently on whether $a$ is a quadratic residue or nonresidue modulo $n$.

### Quadratic reciprocity

The Kronecker symbol also satisfies the following versions of quadratic reciprocity law.
For any nonzero integer $n$, let $n'$ denote its odd part: $n=2^{e}n'$ where $n'$ is odd (for $n=0$, we put $0'=1$). Then the following symmetric version of quadratic reciprocity holds for every pair of integers $m,n$ such that $\gcd(m,n)=1$:
    $\left({\frac {m}{n}}\right)\left({\frac {n}{m}}\right)=\pm (-1)^{{\frac {m'-1}{2}}{\frac {n'-1}{2}}},$
where the $\pm$ sign is equal to $+$ if $m\geq 0$ or $n\geq 0$ and is equal to $-$ if $m<0$ and $n<0$.
There is also equivalent non-symmetric version of quadratic reciprocity that holds for every pair of relatively prime integers $m,n$:
    $\left({\frac {m}{n}}\right)\left({\frac {n}{|m|}}\right)=(-1)^{{\frac {m'-1}{2}}{\frac {n'-1}{2}}}.$
For any integer $n$ let $n^{*}=(-1)^{(n'-1)/2}n$. Then we have another equivalent non-symmetric version that states
    $\left({\frac {m^{*}}{n}}\right)=\left({\frac {n}{|m|}}\right)$
for every pair of integers $m,n$ (not necessarily relatively prime).
The supplementary laws generalize to the Kronecker symbol as well. These laws follow easily from each version of quadratic reciprocity law stated above (unlike with Legendre and Jacobi symbol where both the main law and the supplementary laws are needed to fully describe the quadratic reciprocity).
For any integer $n$ we have
    $\left({\frac {-1}{n}}\right)=(-1)^{\frac {n'-1}{2}}$
and for any odd integer $n$ it's
    $\left({\frac {2}{n}}\right)=(-1)^{\frac {n^{2}-1}{8}}.$

## Connection to Dirichlet characters

If $a\not \equiv 3{\pmod {4}}$ and $a\neq 0$, the map $\chi (n)=\left({\tfrac {a}{n}}\right)$ is a real Dirichlet character of modulus ${\begin{cases}4|a|,&a\equiv 2{\pmod {4}},\\|a|,&{\text{otherwise.}}\end{cases}}$ Conversely, every real Dirichlet character can be written in this form with $a\equiv 0,1{\pmod {4}}$ (for $a\equiv 2{\pmod {4}}$ it's $\left({\tfrac {a}{n}}\right)=\left({\tfrac {4a}{n}}\right)$).
In particular, primitive real Dirichlet characters $\chi$ are in a 1–1 correspondence with quadratic fields $F=\mathbb {Q} ({\sqrt {m}})$, where $m$ is a nonzero square-free integer (we can include the case $\mathbb {Q} ({\sqrt {1}})=\mathbb {Q}$ to represent the principal character, even though it is not a quadratic field). The character $\chi$ can be recovered from the field as the Artin symbol $\left({\tfrac {F/\mathbb {Q} }{\cdot }}\right)$: that is, for a positive prime $p$, the value of $\chi (p)$ depends on the behaviour of the ideal $(p)$ in the ring of integers $O_{F}$:
    $\chi (p)={\begin{cases}0,&(p){\text{ is ramified,}}\\1,&(p){\text{ splits,}}\\-1,&(p){\text{ is inert.}}\end{cases}}$
Then $\chi (n)$ equals the Kronecker symbol $\left({\tfrac {D}{n}}\right)$, where
    $D={\begin{cases}m,&m\equiv 1{\pmod {4}},\\4m,&m\equiv 2,3{\pmod {4}}\end{cases}}$
is the discriminant of $F$. The conductor of $\chi$ is $|D|$.
Similarly, if $n>0$, the map $\chi (a)=\left({\tfrac {a}{n}}\right)$ is a real Dirichlet character of modulus ${\begin{cases}4n,&n\equiv 2{\pmod {4}},\\n,&{\text{otherwise.}}\end{cases}}$ However, not all real characters can be represented in this way, for example the character $\left({\tfrac {-4}{\cdot }}\right)$ cannot be written as $\left({\tfrac {\cdot }{n}}\right)$ for any $n$. By the law of quadratic reciprocity, we have $\left({\tfrac {\cdot }{n}}\right)=\left({\tfrac {n^{*}}{\cdot }}\right)$. A character $\left({\tfrac {a}{\cdot }}\right)$ can be represented as $\left({\tfrac {\cdot }{n}}\right)$ if and only if its odd part $a'\equiv 1{\pmod {4}}$, in which case we can take $n=|a|$.