$f:\mathbb R^{2}\rightarrow \mathbb R$ by $f(x,y)=1,$ if $xy=0$ and $=2,$otherwise.

I came across the problem which is as follows:

Define $f:\mathbb R^{2}\rightarrow \mathbb R$ by \begin{align}f(x,y)&=\begin{cases}1\,\,\,\, \text{if xy=0}\\ 2 \,\,\, \,\text{otherwise}\end{cases} \end{align} Now, if $S=\lbrace(x,y):f\mbox { is continuous at} (x,y)\rbrace$, then which of the following is correct?

(a) $S$ is open,

(b) $S$ is connected,

(c) $S$=$\phi$,

(d) $S$ is closed.

My attempts: Here,we see that points of discontinuity lie on the $x$ and $y$-axis where one of x and y is zero.So,I can come to conclusion that the set of points of $S$ (where $f$ is supposed to be continuous)lie in the co-ordinate planes minus the coordinate axes.So, I think the set S is connected.Am I going in the right direction? I need a bit of explanation here. Please help.Thank you in advance for your time.

-
Can you find some points where $f$ is continuous? –  lhf Dec 14 '12 at 17:14

We should find out where our function is continuous. Take a point $(a,b)$ not on one of the two axes. Then there is an open neighbourhood of $(a,b)$ that avoids the two axes, so there is an open neighbourhood of $(a,b)$ such that for any $(s,t)$ in that neighbourhood, we have $f(s,t)=f(a,b)=2$. Thus $f$ is continuous at $(a,b)$.

Now let $(a,b)$ be on one of the axes. Then any open neighbourhood of $(a,b)$ contains a point not on an axis, that is, a point at which $f$ is equal to $2$. So taking $\epsilon=1/2$, we find that there is no positive $\delta$ such that $|f(a,b)-f(s,t)|\lt \epsilon$ for every point at distance $\lt \delta$ from $(a,b)$. So $f$ is not continuous at any point on one of the axes.

So we know that $S$ consists of all points not on one of the axes: the answers should now come easily.

-

Hint: $f$ is discontinous only at $x$-axis and $y$-axis.

-
I have got your point and edited my attempts accordingly..Thanks a lot for the hint. But i am still confused about the final conclusion. Option $(c)$ can be eliminated. I am confused between $(a)$ and $(b)$. –  learner Dec 14 '12 at 17:51
@learner: $S$ is surely open because it is the union of four open sets, namely each quadrants (open) but $S$ is not connected because it is not path connected - take two points, each of them in different quadrants, then they can not be joined by any path lying in $S$. –  pritam Dec 14 '12 at 18:01
thanks a lot for the clarification.I have got it. It is crystal clear now. +1 from me.. –  learner Dec 14 '12 at 18:05