Prove that $S=\{(x,y):|x+y|\leq 1, |xy|\leq 1\}$ is a compact set 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.
 A: $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).
A: $S=f^{-1}([0,1])\cap g^{-1}([0,1])$
where $g(x,y)=|x+y|$ and $f(x,y)=|xy|$,so it is closed as in intersection of closed sets..(the sets are closed because $f,g$ are continuous and we know that the inverse image of a closed set under a continuous function is closed)
A: The fastest way might be to say that the function defined by
$$
f(x,y) = (|x+y|, |xy|)
$$
is continuous on $\mathbb R^2$ and so $S = f^{-1}([0,1]^2)$ is the inverse image of a closed set by a continuous function, hence is closed.
A: I would like to give here a different direction.
Among the 2 equations defining set $S$, the most restrictive is
$$|xy| \le 1 \implies ((|x| \le 1) \ \text{and} \ (|y| \le 1)) \implies x^2+y^2 \le 2$$
Therefore, $S$ is a bounded set (see figure below).
Besides, $S$ is a closed set (because it is defined as the intersection of 2 closed sets, this closedness coming from the definition by equations with $ \le$ signs).
Being bounded and closed, $S$ is a compact set.

Fig. 1:  Intersection set of a NW-SE stripe defined by $-1 \le x+y \le 1$ and the interior of hyperbola with equation $y=-\frac{1}{x}$ (the other hyperbola $y=\frac{1}{x}$ plays no rôle).
A: Using the first approach, you don't need to explicitly calculate the distances, you just need to find a small enough neighborhood that is still contained in the set, using some bounds. Specifically, suppose that $|xy|=1 + \epsilon>1$. Then you will need to show that $|(x+\delta x)(y + \delta y)|>1$ if $\delta x$ and $\delta y$ are small enough. In particulat you can define some small $\gamma$ depending on $\epsilon$ such that if $\delta x^2 + \delta y^2 < \gamma$ then $|(x+\delta x)(y + \delta y)|>1$. A $\gamma$ that works in this case is $\gamma=\left(\min\left\{\frac{\epsilon}{1+|x| + |y|}, \frac12 \right\}\right)^2$, since $|\delta x|\le \sqrt{\gamma}$, $|\delta y|\le \sqrt{\gamma} \le \frac12$ and
$$\begin{aligned}
|(x+\delta x)(y + \delta y)|&\ge |xy| - |\delta x||y|-|\delta y||x| - |\delta x||\delta y|\ge |xy| - \sqrt{\gamma}\left(|y| + |x| + \frac12\right)\\&> 1 + \epsilon - \epsilon = 1
\end{aligned}$$
The second approach is easier though: the function $f(x,y) = |xy| - 1$ is continuous.
