0

I'm trying to find the GCD of $x^3+2x^2+3x+4$ and $x+2$ over $\Bbb Z _5[x]$

I tried to use GCD euclidean algorithm and got the folowing:

$x^3+2x^2+3x+4 = (x^2+3)(x+2)+3$

$(x+2) = (2x)3+2$

$3=3\cdot2 + 2$

Which imply that 2 is the last reminder so the GCD is 2. the problem is somehow the gcd should be 1 and I can't understand why the algorithm fail or where I'm wrong in the process

yoyo
  • 9,943
3xhaust
  • 158
  • 7
    The GCD is only determined up to units; $2$ is a unit in $\mathbb{Z}_5$. Compare with finding the GCD of $x+3$ and $x+1$ in $\mathbb{Q}[x]$. – Arturo Magidin Aug 03 '23 at 20:12
  • @ShyamalSayak: no, Arturo's comment is correct: see https://en.wikipedia.org/wiki/Polynomial_greatest_common_divisor#:~:text=In%20particular%2C%20gcd(p%2C,and%20q%20are%20coprime%20polynomials. – Rob Arthan Aug 03 '23 at 20:34
  • So if I understand it correctly, after getting the last polynomial I have to multiply it to get monic polynomial? – 3xhaust Aug 03 '23 at 20:38
  • You can; that is common (just like we usually take the positive value for the gcd when working in the integers). Here, you could multiply by $3$ (which is invertible/a unit) to get the monic associate. But in general, "the" GCD is only determined up to associates. – Arturo Magidin Aug 03 '23 at 20:49
  • 1
    @RobArthan Yes. I am agreeing with Arturo. We can take the GCD to be 1 here. – ShyamalSayak Aug 03 '23 at 21:18
  • @ShyamalSayak: sorry to be picky, but saying "the GCD is 1" sounds like you are disputing that the GCD can be taken as 2. – Rob Arthan Aug 03 '23 at 21:41
  • Also note that the last equation should have been $3=4\cdot 2+0$. You divide and get a remainder of degree strictly less than the divisor. In $3=3\cdot 2+2$, the remainder $2$ and the quotient $2$ have the same degree $0$. – NDB Aug 03 '23 at 23:07
  • @RobArthan 2 is a unit in $\mathbb{Z}_5$, so it doesn't matter. GCD is determined up to units in UFDs. – ShyamalSayak Aug 04 '23 at 00:11
  • @ShyamalSayak: but you didn't say that: you wrote "GCD is 1 in this case". That is a misleading statement. – Rob Arthan Aug 04 '23 at 00:16

1 Answers1

1

When talking about gcds or primes over the integers, we usually take the positive representative, but that's a convention and we get back and forth by multiplying by $\pm1$.

Working with polynomials over a field, $k[x]$, we usually take a monic representative (lead coefficient 1), and we can get back and forth multiplying by some unit in $k^{\times}$.

Both $\mathbb{Z}$ and $k[x]$ are Euclidean domains (have a division algorithm or Euclidean algorithm), the division algorithm giving a proof that all ideals are principal. A generator for the principal ideal is only determined up to a unit. The units of $\mathbb{Z}$ are $\{\pm1\}$ and the units of $k[x]$ are $k^{\times}=k\backslash\{0\}$.

The Euclidean algorithm produces a generator for the ideal generated by two elements $(a,b)=(d)$ and in fact gives a relation $ax+by=d$.

[In your example, one of the arguments is linear ($x+2$) so the gcd is either going to be $(x+2)$ or $(1)$, and you showed that it is (1). All degree one polynomials are prime/irreducible in $k[x]$, so given another polynomial, either $x+2$ divides it or not.]

yoyo
  • 9,943