If $xy$ is a unit, are $x$ and $y$ units?

Yes. Let $z=xy$. If $z$ is a unit with inverse $z^{-1}$, then $x$ is a unit with inverse $yz^{-1}$, and $y$ is a unit with inverse $xz^{-1}$, because $$x(yz^{-1})=(xy)z^{-1}=zz^{-1}=1$$ $$y(xz^{-1})=(yx)z^{-1}=(xy)z^{-1}=zz^{-1}=1$$


In a commutative ring, yes: let $u$ be such that $u(xy)=1 = (xy)u$. Then $$x(uy) = u(xy) = 1\quad\text{and}\quad (uy)x = u(xy) = 1,$$ so $x$ is invertible; and if $x$ is invertible, and $xy$ is a unit, then $y=x^{-1}xy$ is a product of units, hence a unit.

In a non-commutative ring, no; you can have a product be a unit yet neither factor be a unit. For example, let $$A = \prod_{i=1}^{\infty}\mathbb{Z}$$ and let $R$ be the ring of endomorphisms of $A$. Let $f\colon A\to A$ be the right-shift operator, and let $g\colon A\to A$ be the left-shift operator. Then $gf=1$ in $R$ and in particular the product is a unit, but neither $f$ nor $g$ are units ($g$ is not one-to-one, so it cannot be left-invertible, and $f$ is not onto, so it cannot be right-invertible).

Of course, if $xy$ is a unit in a non-commutative ring, then $x$ is right-invertible and $y$ is left-invertible, but that's the best you can say in general, as the example above shows.


HINT $\ $ Units are precisely the divisors of $1\:.\:$ Hence by transitivity of 'divides' we deduce

$$\rm xy\ unit\ \Rightarrow\ xy\ |\ 1\ \Rightarrow\ x\ |\ xy\ |\ 1\ \Rightarrow\ x\ unit\ \qquad QED$$

I.e. the set of all divisors of a fixed element is closed under taking divisors (by transitivity).

This can be viewed as the dual of the well-known "divides = contains" for principal ideals. Namely, let $\rm\: D(x) =\: $ the set of divisors of $\rm\:x\:$ and let $\rm\: M(x) =\: $ the set of multiples of $\rm\:x\:.\:$ Then we have

$\rm\qquad a\ |\ b\ \iff\ M(a) \supset M(b)\quad $ i.e. divides = contains $\qquad\ \ $ for multiple sets

$\rm\qquad a\ |\ b\ \iff\ D(a)\ \subset\: D(b)\quad $ i.e. divides = contained-in $\ $ for divisor sets

So $\rm\ u\ |\ 1\ \iff\ D(u)\:\subset D(1)\quad\:$ i.e. $(\Rightarrow)$ says: $\:$ if $\rm\:u\:$ is a unit then every divisor of $\rm\:u\:$ is a unit.