Prove that $S=\{(x,y):|x+y|\leq 1, |xy|\leq 1\}$ is a compact set

analysiscalculuscompactnesscontinuityreal-analysis

In my analysis test today, I was asked the question

Prove that the set
$$S=\{(x,y):|x+y|\leq 1, |xy|\leq 1\}$$
is compact in $\mathbb R^2$.

Now, of course, to prove compactness, we need to show that $S$ is closed and bounded, and then use the Heine Borel Theorem. The bounded part is easy to show, since the set is contained in a ball of radius $2$. It was the closed part that sucked my blood out of me. I know that it's intuitively clear since the set contains the boundary. But, that's not an answer you write in your analysis test. What I did was to write
$$S=S_1\cap S_2$$
where
\begin{align*}
S_1&=\{(x,y):|x+y|\leq 1\}\\
S_2&=\{(x,y):|xy|\leq 1\}
\end{align*}

and then tried to prove that $S_1^\prime$ and $S_2^\prime$ are open (which proves that $S_1$ and $S_2$ are closed, and hence their intersection is closed). In the case of $S_1^\prime$, the distance between an arbitrary point and the lines $|x+y|\leq 1$ was easy to calculate explicitly; in the case of $S_2^\prime$, not really so.

Anyways, I feel, I wasn't rigorous enough, and there must be a neater way to solve this. Especially, I spent some time to find a continuous function $f$ such that the preimage of $f$ under some closed set is $S$, but couldn't find it. I'm quite sure, there must be a function which does the job.

Is there a better (than explicitly calculating distances) way to slove this?

Here's a graph of $S$, in case you are interested.

Best Answer

$f: \mathbb R^2 \to \mathbb R^2$ given by $$ f(x,y) = (|x+y|,|xy|) $$

is continuous as each component is continuous. We have $$ S = f^{-1}([0,1] \times [0,1]) $$

so $S$ is the preimage of a closed set. Alternately you can also define $$ g(x,y) = (x+y,xy) $$ which is continuous, and then $S = g^{-1}([-1,1] \times [-1,1])$. In either case, $S$ is closed. The boundedness of $S$ follows from the fact that for $(x,y)\in S$, $$ x^2+y^2 = (x+y)^2 - 2xy \leq |x+y|^2 + 2|xy| \leq 3 $$

and you are good. (I mean, you've already proved this, so this is just for completeness).