2
$\begingroup$

This question already has an answer here:

Excuse me for the confusing title. I was asked to find $gcd(x^2+3x+2,x^2+x)$

What i did is i factorized both polynomials $x^2+x=(x+1)x$

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

So i expected the gcd to be $x+1$

But using the euclidean algorithm i found out the gcd to be $2x+2$. Why is factorizing wrong? Is it because $K[X]$ is not factorial ? Would the euclidean algorithm also work if the polynomials are in $\Bbb Z[X]$ ???

$\endgroup$

marked as duplicate by Bill Dubuque abstract-algebra Oct 17 '18 at 19:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ $\langle x^2 + 3x + 2, x^2 + x \rangle$ is not a principal ideal in $\mathbb{Z}[x]$ - despite the fact that $\mathbb{Z}[x]$ is in fact a UFD. On the other hand, if you take the gcd in $\mathbb{Q}[x]$ which is a PID then your two answers differ by a unit. $\endgroup$ – Daniel Schepler Oct 17 '18 at 18:45
  • $\begingroup$ As Daniel said, $2x+2=2(x+1)$ and $x+1$ are not different as factorizations over $\mathbb Q[x]$. Nothing went wrong on that front. $K[x]$ is always factorial when $K$ is a field (or even if just $K$ is factorial.) $\endgroup$ – rschwieb Oct 17 '18 at 18:46
  • $\begingroup$ So factorizing over $\Bbb Q [X] $ doesnt make sense ? $\endgroup$ – asddf Oct 17 '18 at 18:48
  • $\begingroup$ @asddf No, it makes perfect sense. You'll have to elaborate on your line of thought for me to follow, because I don't know what would prompt you to ask such a thing. $\endgroup$ – rschwieb Oct 17 '18 at 18:49
  • $\begingroup$ Ok i think i follow now, thank you $\endgroup$ – asddf Oct 17 '18 at 18:51
2
$\begingroup$

There is no unique gcd of two polynomials $f,g\in \Bbb{Q}[X]$. It is only unique up to a unit in $\Bbb{Q}$. So any of the polynomials $c(X+1)$ with $c\neq 0$ is a gcd of $X^2+3X+2$ and $X^2+X$.

References: Uniqueness of greatest common divisor

gcd(a,b) is unique up to units in a unique factorization domain

Greatest common divisor of two polynomials in $\Bbb Q[X]$

$\endgroup$
0
$\begingroup$

Remark that $x^2+3x+2-(x^2+x)=2x+2$, this implies that $(x+1)$ is contained in $(x^2+3x+2,x^2+x)$, the fact that $(x+1)$ contains $(x^2+3x+2,x^2+2)$ results from the factorizations that you have provided. $gcd(P(x),Q(x))=(P(x),Q(x))$.

$\endgroup$
  • $\begingroup$ Excuse me, can you elaborate ? $\endgroup$ – asddf Oct 17 '18 at 18:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.