two questions on general topology 
*

*Let $X$ be a a connected set of real numbers. If every element of $X$ is irrational then the cardinality of $X$ is   


*

*Infinite   

*Countably finite    

*$3$        

*$1$   


*Let $(X,d)$ be a metric space and let $A⊆X$. For $x∈X$, define $$d(x,A) = \inf\{d(x,a):a∈A\}.$$ If $d(x,A)=0$ for all $x∈X$, then which of the following must be true?    


*

*$A$ is compact    

*$A$ is closed  

*$A$ is dense in $X$       

*$A=X$   



My thoughts:
For 1st question, 4 is correct as rationals or irrationals are dense.
For 2nd question, 3 is correct as in that case every point of $A$ becomes a limit point of $X$.
Are my conclusions correct?
 A: Your answers are correct, but the reason that you give for the first problem could be stated better. The fact that the irrationals are dense in $\Bbb R$ is irrelevant: what matters is that the rationals are dense. You know that a connected subset of $\Bbb R$ must be an interval, but every non-trivial interval contains a non-empty open interval and therefore a rational number, so the only connected sets consisting entirely of irrational numbers are trivial intervals of the form $[x,x]=\{x\}$ for irrational $x$.
Jonas Meyer makes the good point that many of us consider the empty set to be connected and would therefore say that the correct answer is that $|X|\le 1$. However, this isn’t an available choice, so it’s clear that $|X|=1$ is the desired answer.
A: Both trains of thought are correct (we'll assume $A$ is nonempty to avoid Jonas's point, since 0 isn't one of the choices anyway). Formally for (1), we can use that any connected set of real numbers enjoys the intermediate value property: if $x,y\in A$ and $x < z < y$, then $x \in A$. Now if $|A|>1$ then there exist $x < y$ in $A$. Then there is a rational number $r$ with $x < r < y$ by density of $\mathbb{Q}$ in $\mathbb{R}$, but $A$ contains only irrational numbers, contradiction. So $|A|\leq 1$, and since $A$ is assumed nonempty $|A|=1$.
A: For your second question,your answer is correct.For every x in X,$\{x\}$can be considered as compact set.for any subset A of X, $d(x,A)=0$ means either x is in A or it is a limit point of A that is same as $x\in \overline A$ this is true
 for all x in A.hence $X= \overline A$ 
