TITLE: What are unramified morphisms like?
QUESTION [10 upvotes]: I'm wondering if finite unramified morphism between reduced schemes decomposes as closed immersions and etale morphisms. Suppose I have a morphism between reduced schemes which is finite, surjective and unramified, is it necessarily etale? I think this is certainly true if both source and target are curves, but I'm not sure about higher dimensional examples. Thanks
EDIT: to avoid trivial example let's assume the source and target are connected. What I'm wondering is precisely when one can deduce flatness from these conditions.

REPLY [13 votes]: Finite, surjective, and unramified does not imply etale.  E.g. suppose that $Y$ is a proper closed subscheme of $X$, and we consider the map $X \coprod Y \to X$ defined as the disjoint union of the identity on $X$, and the given closed immersion $Y \to X$
on $Y$.
Then this map is finite, unramified, and surjective, but not etale.  (See Sandor's answer for the missing condition,
which is flatness!)
Added: A more interesting example is given by letting $X$ be a nodal cubic, letting
$\tilde{X}$ be the normalization, and considering the natural map $\tilde{X} \to X.$
This map is not flat and certainly not etale, but it is unramified.  (Formally, each branch
through the node maps by a closed immersion into the nodal curve.)

REPLY [8 votes]: You also need flat. See Hartshorne, Ex. III.10.3.