TITLE: Continuity of coordinate functions
QUESTION [13 upvotes]: Let $X$ and $Y$ be topological spaces, $X\times{Y}$ with the product topology, and $f$ a function from $X\times{Y}$ to some other topological space. I know that the fact that the functions $f(x,.)$ and $f(.,y)$ are continuous for all $x\in{X}$ and $y\in{Y}$ doesn't imply that $f$ is continuous, but I just can't find a counter-example.

REPLY [15 votes]: The condition you're describing is called continuous in each variable separately, and you're right; it's not enough to guarantee continuity on the product space.
One conventional counterexample is $f \colon \mathbb{R} \times \mathbb{R} \to \mathbb{R}$, 
$$
    f(x,y) = \begin{cases} \frac{xy}{x^2+y^2} & (x,y) \neq (0,0) \\ 0 & (x,y) = (0,0) \end{cases}
$$
Then $f$ is continuous in each variable separately.  Indeed, the only non-obvious paths to consider are $f(0,y)$ and $f(x,0)$, and along these lines $f$ is identically zero.  But $f$ is not continuous at zero; if you approach along the line $y=x$ you get a path limit of $\frac{1}{2}$.