Consider the following subsets of $\mathbb{R}^2$,where $a,b\in\mathbb{R}$ consider the following subset of $\Bbb R^2$,where $a,b\in\Bbb R$:


*

*$A=\{(x,y):\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1,a\neq b\}$

*$B=\{(x,y):\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}\leq1,a\neq b\}$

*$C=\{(x,y):ax+by+5=0\}$

*$D=\{(x,y):ax=by^2\}$

*$E=\{(x,y):x^2+y^2=1\}$
Then which of the following is correct?


*

*$C$ and $D$ are compact,but $A,B,E$ are not compact.

*$A$ and  $B$ are compact,but $C,D,E,$ are not compact.

*$A,B$ and $E$ are compact but $C,D$ are not compact.

*$A$ and $E$  are compact but $B,C,D$ are not compact. 
How we can solve this
 A: Hint:
A Boundary set is a closed set, so $A, E$ is closed and since they are subset of $\mathbb R^2$ so they are both compact. The same story is true for B. In fact, it depicts a closed set including an interior set $\frac{x^2}{a^{2}}+\frac{y^2}{b^2}<1$ and a boundary set $\frac{x^2}{a^{2}}+\frac{y^2}{b^2}=1$.
A: If $f\colon\mathbb{R}^2\to\mathbb{R}$ is continuous, then the inverse image of any closed subset is closed.
In particular, if $f(x,y)=\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}$, you get that the inverse image of $\{1\}$ and of $[0,1]$ are both closed in $\mathbb{R}^2$. Therefore your sets $A$, $B$ and $E$ are closed (the last one is the case $a=b=1$).
Similarly, considering $g(x,y)=ax+by+5$, the set $C$ is the inverse image of $\{0\}$, so $C$ is closed. Also $D$ is closed, because it is the inverse image of $\{0\}$ under the function $h(x,y)=ax-by^2$.
Since you're interested in compactness, the only thing you have to check for the five sets is their boundedness or unboundedness.
Can you see which ones are bounded and which ones aren't?
A: Correct answer should be 3. Just apply Heine-Borel theorem and see which sets are closed as well as bounded.
