르장드르 기호

정의[편집 | 원본 편집]

[math]\displaystyle{ p }[/math]가 3 이상의 소수이고 [math]\displaystyle{ a }[/math][math]\displaystyle{ (a,p)=1 }[/math]정수일 때, 다음 기호

[math]\displaystyle{ \left(\frac{a}{p}\right)=\begin{cases} 1,& (\exists x\in \mathbb{Z})[x^2 = a]\\ -1,& (\forall x\in\mathbb{Z})[x^2\ne a] \end{cases} }[/math]

르장드르 기호(Legendre symbol)라고 한다. 즉, [math]\displaystyle{ a }[/math]가 법 [math]\displaystyle{ p }[/math]에 대한 이차잉여이면 [math]\displaystyle{ \left(\frac{a}{p}\right)=1 }[/math]이고 그렇지 않으면 [math]\displaystyle{ \left(\frac{a}{p}\right)=-1 }[/math]이다. 책에 따라서 정의를 조금 확장하여, [math]\displaystyle{ p\mid a }[/math]이면 [math]\displaystyle{ \left(\frac{a}{p}\right)=0 }[/math]이라 하기도 한다. 여기서는 [math]\displaystyle{ (a,p)=1 }[/math]인 경우만 고려한다.

기본 성질[편집 | 원본 편집]

[math]\displaystyle{ p,q }[/math]가 서로 다른 3 이상의 소수이고 정수 [math]\displaystyle{ a,b }[/math]에 대해 [math]\displaystyle{ (a,p)=(b,p)=1 }[/math]일 때,

  1. [math]\displaystyle{ \left(\frac{a^2}{p}\right)=1 }[/math]
    [math]\displaystyle{ x=a }[/math]는 합동식 [math]\displaystyle{ x^2\equiv a^2\pmod p }[/math]의 해이므로 자명하다.
  2. [math]\displaystyle{ a\equiv b \pmod p }[/math]이면 [math]\displaystyle{ \left(\frac{a}{p}\right)=\left(\frac{b}{p}\right) }[/math]이다.
    [math]\displaystyle{ a\equiv b \pmod p }[/math]라고 가정하면 두 합동식 [math]\displaystyle{ x^2\equiv a\pmod p }[/math][math]\displaystyle{ x^2\equiv b\pmod p }[/math]는 동치이므로 원하는 결론을 얻는다.
  3. [math]\displaystyle{ \left(\frac{ab}{p}\right)=\left(\frac{a}{p}\right)\left(\frac{b}{p}\right) }[/math]
    최대공약수의 성질에 의해 [math]\displaystyle{ (ab,p)=1 }[/math]이므로, 지수법칙에 의해 [math]\displaystyle{ \left(\frac{ab}{p}\right)=(ab)^{\frac{p-1}{2}}=a^{\frac{p-1}{2}}b^{\frac{p-1}{2}}=\left(\frac{a}{p}\right)\left(\frac{b}{p}\right) }[/math]이므로 원하는 결론을 얻는다. 여기서 르장드르 기호는 완전 곱셈적 함수임을 알 수 있다. 좀 더 엄밀히 표현하면, [math]\displaystyle{ L:{\mathbb{F}_p}^\times\to\left\{\pm1\right\} }[/math]가 완전 곱셈적 함수인 것.

한 예로, [math]\displaystyle{ \left(\frac{860}{103}\right) }[/math]의 값을 구해 보자. 103은 소수이고,

[math]\displaystyle{ 860=8\cdot 103 + 36 }[/math]

이므로 [math]\displaystyle{ 860 \equiv 36 \pmod{103} }[/math]이다. 따라서

[math]\displaystyle{ \left(\frac{860}{103}\right)=\left(\frac{36}{103}\right) }[/math]

이다. 그런데 [math]\displaystyle{ 36=6^2 }[/math]이므로

[math]\displaystyle{ \left(\frac{860}{103}\right)=\left(\frac{36}{103}\right)=1 }[/math]

임을 알 수 있다.

오일러 판정법[편집 | 원본 편집]

오일러의 규준이라고도 부른다.

  • [math]\displaystyle{ \left(\frac{a}{p}\right)\equiv a^{\frac{p-1}{2}} \pmod p }[/math]
    [math]\displaystyle{ x_1,\ldots. x_{\frac{p-1}{2}} }[/math]를 법 [math]\displaystyle{ p }[/math]이차잉여라 하자. [math]\displaystyle{ a }[/math]가 이차잉여인 경우 [math]\displaystyle{ \{ax_1,\ldots, ax_{\frac{p-1}{2}} \} }[/math]는 집합으로서 [math]\displaystyle{ \{x_1,\ldots, x_{\frac{p-1}{2}} \} }[/math] 와 일치할 것이다. 따라서 모든 원소의 곱도 일치하고, [math]\displaystyle{ a^{\frac{p-1}{2}} x_1\cdots x_{\frac{p-1}{2}} \equiv x_1\cdots x_{\frac{p-1}{2}} \pmod{p} }[/math]가 성립한다. 양변을 소거하면 오일러의 규준을 얻는다.
    [math]\displaystyle{ a }[/math] 가 이차잉여가 아닐 경우, [math]\displaystyle{ ax_i }[/math] 들 또한 이차잉여가 아닐 것이고, 마찬가지로 [math]\displaystyle{ ax_i^{-1} }[/math] 또한 이차잉여가 아닐 것이다. 따라서 [math]\displaystyle{ \{x_1,\ldots, x_{\frac{p-1}{2}} \} \cup \{ax_1^{-1} ,\ldots, ax_{\frac{p-1}{2}} ^{-1} \} = \{1,2,\ldots, p-1\} }[/math] 이다. 모든 원소의 곱을 비교하면 [math]\displaystyle{ a^{\frac{p-1}{2}} \equiv (p-1)! \equiv -1 \pmod p }[/math] 를 얻는다. 여기서 마지막 등호는 윌슨의 정리의 결과이다.

오일러 판정법을 사용해 다음을 보일 수 있다.

  • [math]\displaystyle{ \left(\frac{-1}{p}\right)=\begin{cases} 1,&\text{if }p\equiv 1\pmod 4\\ -1,&\text{if }p\equiv -1\pmod 4 \end{cases} }[/math]
    오일러의 규준에 의해 [math]\displaystyle{ \left(\frac{-1}{p}\right)\equiv (-1)^{\frac{p-1}{2}}\pmod p }[/math]인데 [math]\displaystyle{ \left(\frac{-1}{p}\right)=\pm 1 }[/math]이므로 [math]\displaystyle{ \left(\frac{-1}{p}\right)= (-1)^{\frac{p-1}{2}} }[/math]이다. [math]\displaystyle{ p }[/math]는 홀수이므로 [math]\displaystyle{ 4k+1 }[/math] 또는 [math]\displaystyle{ 4k-1 }[/math] 꼴인데, [math]\displaystyle{ (-1)^{2k}=1 }[/math]이고 [math]\displaystyle{ (-1)^{2k-1}=-1 }[/math]이므로 원하는 결론을 얻는다.

가우스 판정법[편집 | 원본 편집]

  • [math]\displaystyle{ a,\,2a,\,\ldots,\,\left(\frac{p-1}{2}\right)a }[/math]를 법 [math]\displaystyle{ p }[/math]에 관해서 최소 양수 나머지로 바꾸자. 저 중에 [math]\displaystyle{ \frac{p}{2} }[/math]보다 큰 수의 개수를 [math]\displaystyle{ s }[/math]라 할 때, [math]\displaystyle{ \left(\frac{a}{p}\right)=\left(-1\right)^s }[/math]이다.
    [math]\displaystyle{ u_1,\,u_2,\,\ldots,\,u_s }[/math][math]\displaystyle{ \frac{p}{2} }[/math]보다 큰 최소 양수 나머지라 하자. 그리고 [math]\displaystyle{ v_1,\,v_2,\,\ldots,\,v_t }[/math][math]\displaystyle{ \frac{p}{2} }[/math]보다 작은 최소 양수 나머지라 하자. 먼저, [math]\displaystyle{ \left\{v_1,\,\ldots,\,v_t,\,p-u_1,\,\ldots,\,p-u_s\right\}=\left\{1,\,2,\,\ldots,\,\frac{p-1}{2}\right\} }[/math]임을 보일 것이다.
    1. 먼저, 모든 원소는 1에서 [math]\displaystyle{ \frac{p-1}{2} }[/math]사이.
    2. [math]\displaystyle{ \frac{p-1}{2} }[/math]개의 원소가 있다.
    3. 만약 [math]\displaystyle{ v_i\equiv v_j\pmod p }[/math]이면, 적당한 정수 [math]\displaystyle{ n,\,m }[/math]에 대해 [math]\displaystyle{ na\equiv ma\pmod p }[/math]이다. 그런데 [math]\displaystyle{ \gcd\left(a,p\right)=1 }[/math]이므로 [math]\displaystyle{ n\equiv m\pmod p }[/math]이다. 그런데 [math]\displaystyle{ n,\,m }[/math]은 1에서 [math]\displaystyle{ \frac{p-1}{2} }[/math]사이의 정수이므로, [math]\displaystyle{ n=m }[/math]이다. 비슷한 방법으로, [math]\displaystyle{ p-u_i\equiv p-u_j\pmod p }[/math]이면 [math]\displaystyle{ i=j }[/math]임을 보일 수 있다. 만약 [math]\displaystyle{ v_i\equiv p-u_j\pmod p }[/math]이면, 적당한 정수 [math]\displaystyle{ n,\,m }[/math]에 대해 [math]\displaystyle{ na\equiv-ma\pmod p }[/math]이다. 즉, [math]\displaystyle{ n+m\equiv0\pmod p }[/math] 그런데 [math]\displaystyle{ n,\,m }[/math]은 1에서 [math]\displaystyle{ \frac{p-1}{2} }[/math]사이의 정수이므로 이는 불가능하다.
    위 세 명제를 합하면 원하는 결과를 얻는다. 따라서, [math]\displaystyle{ v_1\cdots v_t\left(p-u_1\right)\cdots\left(p-u_s\right)\equiv1\cdot2\cdots\frac{p-1}{2}\pmod p }[/math]이고, 정리하면 [math]\displaystyle{ \left(-1\right)^sv_1\cdots v_t u_1\cdots u_s\equiv\left(\frac{p-1}{2}\right)!\pmod p }[/math]이다. 여기서 좌변은 [math]\displaystyle{ \left(-1\right)^sa^{\frac{p-1}{2}}\left(\frac{p-1}{2}\right)! }[/math]과 합동이고, [math]\displaystyle{ p\not\mid\left(\frac{p-1}{2}\right)! }[/math]이므로 [math]\displaystyle{ \left(-1\right)^sa^{\frac{p-1}{2}}\equiv1\pmod p }[/math]이다. 따라서, 위 오일러 판정법에 의해 [math]\displaystyle{ \left(-1\right)^s\equiv a^{\frac{p-1}{2}}\equiv\left(\frac{a}{p}\right)\pmod p }[/math].

한 예시를 통해 가우스 판정법이 어떻게 쓰이는지 확인해 보자. 만약 [math]\displaystyle{ a=5,\,p=11 }[/math]이면, [math]\displaystyle{ \frac{p-1}{2}=5 }[/math]이고, [math]\displaystyle{ \left\{a,2a,3a,4a,5a\right\}=\left\{5,10,15,20,25\right\} }[/math]를 법 11에 관한 최소 양수 나머지로 바꾸면 [math]\displaystyle{ \left\{5,11,4,9,3\right\} }[/math]이다. 이중 [math]\displaystyle{ \frac{p-1}{2}=5.5 }[/math]보다 큰 수의 개수는 2이다. 따라서, [math]\displaystyle{ s=2 }[/math]이고, [math]\displaystyle{ \left(\frac{5}{11}\right)\equiv\left(-1\right)^s\equiv1\pmod p }[/math]이다.

가우스 판정법을 사용하면 2가 어떨 때 이차잉여인지 확인할 수 있다.

  • [math]\displaystyle{ \left\{2,2\cdot2,\cdots,\frac{p-1}{2}\cdot2\right\} }[/math]는 법 [math]\displaystyle{ p }[/math]에 대해 이미 최소 양수 나머지이다. 또한, [math]\displaystyle{ i\cdot2\lt \frac{p}{2} }[/math]이기 위한 조건은 [math]\displaystyle{ i\lt \frac{p}{4} }[/math]인 것이다. 즉, [math]\displaystyle{ s=\frac{p-1}{2}-\left\lfloor\frac{p}{4}\right\rfloor }[/math]. 따라서, [math]\displaystyle{ \left(\frac{2}{p}\right)=\left(-1\right)^{\frac{p-1}{2}-\left\lfloor\frac{p}{4}\right\rfloor} }[/math]. 만약 [math]\displaystyle{ p\equiv\pm1\pmod8 }[/math]이면, 직접 계산을 통해 [math]\displaystyle{ \left(\frac{2}{p}\right)=1 }[/math]임을 확인할 수 있다. 만약 [math]\displaystyle{ p\equiv\pm3\pmod8 }[/math]이면, 마찬가지로 [math]\displaystyle{ \left(\frac{2}{p}\right)=-1 }[/math]임을 확인할 수 있다. 정리하면 다음과 같다.
  • [math]\displaystyle{ \left(\frac{2}{p}\right)=\begin{cases} 1,&\text{if }p\equiv \pm 1\pmod 8\\ -1,&\text{if }p\equiv \pm 3\pmod 8 \end{cases} }[/math]

위 두 조건을 하나로 합치면, [math]\displaystyle{ \left(\frac{2}{p}\right)=\left(-1\right)^{\frac{p^2-1}{8}} }[/math]이다. 증명은 생략.

이차 상호법칙[편집 | 원본 편집]

[math]\displaystyle{ p,\,q }[/math]가 서로 다른 홀수인 소수일 때,

[math]\displaystyle{ \left(\frac{q}{p}\right)\left(\frac{p}{q}\right)=(-1)^{\frac{p-1}{2}\frac{q-1}{2}} }[/math]

르장드르 기호의 값을 계산할 때 유용하게 쓰는 법칙이다. 카를 프리히드리 가우스가 1798년에 처음 증명했다. 자세한 내용은 이차 상호 법칙 문서 참조.

관련 항목[편집 | 원본 편집]

각주