TITLE: Is the product of non-separated schemes non-separated?
QUESTION [12 upvotes]: My question is the title, but let me be more specific: for schemes $X$ and $Y$ over $S$, with at least one non-separated over $S$, is it true that the fibered product $X\times_S Y$ is also not separated over $S$?
My instinct says "no" because of the remarks at the top of page 95 in Hartshorne: "The rough idea is that in order for a schemes $X$ to be separated, it should not contain any subscheme which looks like a curve with a doubled point..."  So if $X$ is not separated, it contains such a subscheme, and thus so should the product $X\times_S Y$. 
I tried proving the claim using the valuative criterion, and I think I was able to do it. Unfortunately, I don't know how to typeset diagrams here (it seems xymatrix is not supported), but the idea is to take 2 of the different morphisms from $T$ to $X$ (using the notation of Hartshorne here in which $T = \text{Spec}(R)$ for a valuation ring $R$) and make them morphisms to the product. Unless I overlooked something, the proof was pretty simple. 
Is all this correct or are there counter-examples out there? 
EDIT: As pointed out by Martin Brandenburg below, in general, the product of non-separated schemes could be separated. However, I think it is true that if the schemes are all over some field $k$ then non-separated-ness is preserved under taking products. Is this true, and if so, how would one prove it?

REPLY [4 votes]: More generally:

Let $X,Y$ be schemes over a field $k$. If $X \times_k Y$ is separated and non-empty, then $X$ and $Y$ are separated.

Proof: Since $X \times_k Y$ is separated over $k$, it is also separated over $Y$ (EGA I, 5.3.1. (v)). Let $y \in Y$. It follows that $X \times_k k(y) \cong (X \times_k Y) \times_Y k(y)$ is separated over $k(y)$. But then $X$ is separated over $k$ (SGA 1, Exp. 5, Cor. 4.8). $\square$
Remark. The same statement holds for many other properties $P$ of schemes. It only has to satisfy descent (DESC), be stable under base change (BC), and satisfy the property $g \circ f \in P \Rightarrow f \in P$ (CANC). In the Appendix of Görtz-Wedhorn, Algebraic Geometry, Part I you find many such properties, for example: locally of finite type, separated. Sometimes (CANC) only holds when $g$ has additional properties. Using the already dealt cases, we also get the statement about products for: affine, locally of finite presentation, proper, qs, qcqs.