units of polynomial rings [duplicate]

When does a polynomial in the ring of polynomial have an inverse? I thought only constant polynomials were units. if there are other units, under what rings can we guarantee the existence of inverse for non-constant polynomials

• What about non-commutative rings – vinolyn sylvia Feb 8 at 7:28

If $$f,g$$ are polynomials with $$f\cdot g=1$$, then $$0 = {\rm deg}(1) = {\rm deg}(f\cdot g) = {\rm deg}(f) + {\rm deg}(g).$$ The last equality holds if the leading coefficient don't cancel. This holds in integral domains. Then the degrees of $$f$$ and $$g$$ must be zero. Thus $$f,g$$ are constant polynomials.