2

I am really having trouble working a problem in my course. I will post it and then add what I have thought etc.

Let p be an odd prime, then using the Euclidian Algorithm, calculated the GCD of of $x^{p-1}-1$ and $x^2+1$ in $\mathbb{Z} / p\mathbb{Z}[x]$

Also, how does $p=1 (mod4)$ tell us that $-1$ is a square in $\mathbb{Z} / p\mathbb{Z}$, infact that $-1$ is a square here if and only if $p=1(mod4)$.

My thoughts:

I know that $$x^{p}-x=(x)(x-1)(x-2)…(x-(p-1))$$ and so that in this sense our roots will be the congruence classes of $1,2,…p-1$

and also that $$x^{p-1}-1=(x-1)(x-2)…(x-(p-1))$$

But I get lost when trying to apply the EA to these polynomials,

like how can I do it when p is arbitrary?

Preferably id like to be able to understand/see how to do the first part first i.e. using division with residue and then move on to the second part. Any insight/hint or solution to this would be great,

Thank you all

Update:

When I try to do division with residue, I just get

$$x^{p-1}-1=(x^2+1)(x^{p-3}-x^{p-5}+x^{p-7}-x^{p-9}...)$$

for example,

$p=7$

$$(x^{6}-1)=(x^2+1)(x^4-x^2+1)$$

for $p=11$

$$(x^{10}-1)=(x^2+1)(x^{8}-x^{6}+x^{4}-x^{2}+1)$$

which for specific cases tells me that 1 is the gcd, but I dont know how to generalize that for the case with arbitrary prime p.

Quality
  • 5,527
  • Hint: if $k$ is a multiple of $4$, then $x^2+1$ divides $x^k-1$ (and hence also $x^{k+2}-x^2$ and $x^{k+2}+1$). You should be able to use this to long-divide $x^{p-1}-1$ by $x^2+1$ pretty quickly. – Greg Martin Nov 01 '15 at 05:53

1 Answers1

1

a) Let $p$ be of the form $4k+3$. Then $\frac{p-1}{2}$ is twice an odd number. It follows that $x^2+1$ divides $x^{p-1}+1$, by the familiar fact that the polynomial $t+1$ divides $t^n+1$ when $n$ is odd.

So $x^{p-1}+1=A(x)(x^2+1)$ for some polynomial $A(x)$. It follows that $x^{p-1}-1=A(x)(x^2+1)-2$. We conclude that $\gcd(x^{p-1}-1,x^2+1)=1$.

b) Now let $p=4k+1$. Observe that the polynomial $t^{2k}-1$ has root $t=-1$. So $t+1$ divides $t^{2k}-1$ and therefore, putting $t=x^2$, we conclude that $x^2+1$ divides $x^{4k}-1$.

Remark: Now to your question about $x^2+1\equiv 0\pmod{p}$ when $p\equiv 1\pmod{4}$. Note that $x^{p-1}-1=(x-1)(x-2)\cdots(x-(p-1))$. Since $x^2+1$ divides this, by unique factorization of polynomials it follows that $x-a$ must divide $x^2+1$ for some $a$, meaning that $x^2+1\equiv 0\pmod{p}$ has a solution.

If instead we take as given that the congruence has a solution, we can show divisibility by $x^2+1$ in another way. For let $a$ and $b$ be the solutions of the congruence. Then $x^2+1$ splits as $(x-a)(x-b)$, which obviously divides $(x-1)(x-2)\cdots(x-(p-1))$, and so the gcd is $x^2+1$.

Proofs that for primes of the form $4k+1$ the congruence $x^2+1\equiv 0\pmod{p}$ has a solution can be found in many places. The problem has been solved repeatedly on MSE. The usual argument uses the fact that $p-1\equiv -1$, $p-2\equiv -2$, and so on, so by Wilson's Theorem $(2k!)^2\equiv -1\pmod{p}$. There are also group theoretic arguments. And our polynomial manipulation in b) gives still another proof.

By the way, it is easy to see from a) that if $p=4k+3$ then the congruence $x^2+1\equiv 0\pmod{p}$ has no solution.

André Nicolas
  • 507,029
  • Hello , I added an update of some work I have tried – Quality Nov 01 '15 at 18:54
  • Your calculation generalizes to all primes of the form $4k+3$. A variant will show you that in the $4k+1$ case there is no remainder. – André Nicolas Nov 01 '15 at 19:02
  • And are all primes of one of these forms? – Quality Nov 01 '15 at 19:09
  • Also when I try doing the division with one of the second form ie p=13 I still get a gcd of 1 with doing EA, is that a mistake? it stays very similar but with a -1 instead of a 1 – Quality Nov 01 '15 at 19:12
  • All odd primes. The question specifies $p$ is odd. – André Nicolas Nov 01 '15 at 19:12
  • Yes, it is a mistake. There should be $0$ remainder. We have $x^{12}-1=(x^4-1)(x^8+x^4+1)$, and $x^2+1$ divides $x^4-1$. – André Nicolas Nov 01 '15 at 19:14
  • Thanks, I wonder though. Would it have been possible to do such a question without making different assumptions about the forms of p? It seems like it would have been extremely hard for me to have thought of it. It is also a first course in algebra – Quality Nov 01 '15 at 19:21
  • Also doesn't $$(x^{12}-1)=(x^2+1)(x^{10}-x^{8}+x^{6}-x^{4}+x^{2}-1)$$ So then i take out the extra term of the exponent four like you said? – Quality Nov 01 '15 at 19:23
  • When you do the division differences show up between primes like $3$ and primes like $5$. – André Nicolas Nov 01 '15 at 19:23
  • Sure, but I was just showing divisibility. Yours is another way to do it. Probably better. But both work. – André Nicolas Nov 01 '15 at 19:24
  • Thanks I get that now, but how can I understand better the two ways to right odd primes? Should they not all be able to be written as 2k+1? – Quality Nov 01 '15 at 19:30
  • I have rewritten the answer, very much streamlining b), to just a couple of lines. About your previous comment, all odd primes can be written as $2l+1$. But there are important number-theoretic differences between primes such as $3,7,11$ and primes such as $5,13,17$. So it is useful to think of odd primes as falling into two classes, those of the form $4k+3$ and those of the form $4k+1$. – André Nicolas Nov 01 '15 at 19:39
  • Thanks, and lastly I wont keep you any longer but I appreaciate the help very much. Lastly I am wondering how I can easily show/see that x+1 divides x^n+1 for n odd? – Quality Nov 01 '15 at 19:44
  • General theorem about polynomials over any field, We have $P(a)=0$ if and only if $x-a$ divides $P(x)$. Apply that using $a=-1$. To prove the theorem, use division with remainder, $P(x)=(x-a)q(x)+r(x)$, where $r(x)$ is a constant. Put $x=a$. We conclude $r=0$, meaning that $x-a$ divides $P(x)$. You probably saw this a long time ago, over the reals, but it works equally well in any field. – André Nicolas Nov 01 '15 at 19:53