Are my sets compact? I want to show that the following sets are compact:

*

*$A=\{(x,y) \in R^2: |x|+y^4+x^2y^2 \leq 16\}$


*$B=\{(x,y,z) \in R^3: x^2+y^2+z^2/3 \leq 1\}$
Well, that is my solution,
For 1
The set is bounded:
$|x|\leq 16$ and $|y|\leq 1$ by the definition of A, so the set is included in the square $[-16,16]×[-1,1]$.
The set is closed:
Let $(x_n,y_n)$ a sequence of points in $A$ such that it converges to $(x,y)$ then we can substitute the points in the definition of $A$ and take a limit getting that $(x,y)$ in $A$.
For B
Boundness:
Let $(x,y,z)$ in $B$ then
$||(x,y,z)||= \sqrt {x^2+y^2+z^2} \leq
\sqrt{3x^2+3y^2+z^2}\leq \sqrt{3}$ by the definition of $B$.
Or doing same like part A:
$|x|\leq 1, |y|\leq 1,|z|\leq 3$ so $B$ is included in the set $[-1,1]×[-1,1]×[-3,3]$.
$B$ is closed using same techniqe above.
What do you think?
 A: That's absolutely correct! I'll summarize everything here, adding a few things along the way.
We shall use the Heine-Borel theorem, which says that the compact sets in $\mathbb R^n$ are exactly the closed and bounded sets.

$$A=\{(x,y) \in \mathbb R^2: |x|+y^4+x^2y^2 \leq 16\}$$
Since $|x| \le 16$ and $|y|^4 \le 16\implies |y| \le 2$, we get $A\subset [-16,16]\times [-2,2]$. The latter is a bounded set in $\mathbb R^2$, and subsets of bounded sets are bounded, so $A$ is bounded as well. Now, there are two ways (that I can think of) to see that $A$ is closed. Let $f(x,y) = |x| + y^4 + x^2y^2$.$$A = \{(x,y)\in\mathbb R^2: f(x,y) \le 16\}= f^{-1}[0,16]$$
where $f:\mathbb R^2\to \mathbb R$ is as given above. We know that $f$ is continuous, and that $[0,16]$ is a closed set. So, the inverse image of $[0,16]$, i.e. $f^{-1}[0,16]$ is also a closed set. The second way is how you approached it, i.e. let $(x_n,y_n)_{n=1}^\infty$ be a sequence in $A\subset \mathbb R^2$, such that $x_n\to x\in\mathbb R$ and $y_n\to y\in\mathbb R$. I should actually write $(x_n,y_n)\to (x,y)$, but coordinate-wise convergence in $\mathbb R^n$ happens if and only if the entire $n$-tuple sequence converges, so we're good. As you mentioned, $|x_n| + y_n^4 + x_n^2y_n^2 \le 16$. Taking limits, $|x| + y^4 + x^2y^2\le 16$ and so $(x,y)\in A$. Since $(x_n,y_n)_{n=1}^\infty$ was arbitrary, set $A$ is closed and we are done.

$$B=\{(x,y,z) \in R^3: x^2+y^2+z^2/3 \leq 1\}$$
$B$ is an ellipsoid (closed) in $\mathbb R^3$, centered at the origin. Assuming we don't know this, let's solve this from scratch. Heine-Borel to the rescue once again! $B$ is bounded since $|x| \le 1$, $|y| \le 1$, $|z| \le \sqrt 3$. While this is enough, you can make this more rigorous by finding a bounded subset (it's literally in front of your eyes at this point) in which $B$ is contained - as we did for $A$. Similarly, you can also take the sequence approach to show that $B$ is closed, as done in the previous part. Take an arbitrary sequence $(x_n,y_n,z_n)_{n=1}^\infty$ in $B$, such that $(x_n,y_n,z_n)_{n=1}^\infty \to (x,y,z)\in\mathbb R^3$. Show $(x,y,z)\in B$ to conclude that $B$ is closed. Alternatively, notice that $g(x,y,z) = x^2 + y^2 + z^2/3$ is a continuous function $g:\mathbb R^3\to\mathbb R$. $B$ is just $g^{-1}[0,1]$, and the fact that $[0,1]$ is closed implies that $B$ is closed.

If you're interested in trying out alternate approaches, I would recommend trying to show that $A$ and $B$ are closed by showing first that their complements are open, i.e. $A^c$ and $B^c$ are open.
About the closed sets of which $A$ and $B$ are (continuous) inverse images: you could choose $(-\infty,16]$ and $(-\infty,1]$ as well (respectively), since they are closed too. However, a moment's reflection will tell you why $f(x,y)$ and $g(x,y,z)$ defined in the two cases can never be negative, so the negative values do not play a role.
Hope this helps!
