$A\subset \Bbb{R}$ and let $X(A)\subset \Bbb{R}^2$ be a union of all segments connecting point $(0,1)$ with points $(a,0)$ such that $a\in A$. Show that $X(A)$ with euclidean metric is complete if and only if it is compact.
So ($\Leftarrow$) direction is easy simply notice that for metric spaces compact is equivalent with sequentially compact and if every sequence have convergent subsequence in $X(A)$ then every cauchy sequence is convergent $X(A)$
The other direction ($\Rightarrow$) I wanted to use Bolzano-Weierstrass to prove sequential compactness, but I struggled to prove that $X(A)$ is bounded, because A can be for example uncountable infinite so I think this approach might be wrong. Unfortunately I had no other ideas.
Assume $X(A)$ is complete.
Our goal is to show that $X(A)$ is compact.
If $S$ is a subset of a complete metric space $M$, then $S$ is complete if and only if $S$ is closed.
Hence, since $X(A)$ is complete, and $X(A)$ is a subset of $\mathbb{R}^2$ (which is complete), it follows that $X(A)$ is closed.
Claim:$\;A$ is bounded.
Suppose otherwise.
Without loss of generality, assume $A$ is unbounded to the right.
Let $1 < a_1 < a_2 < a_3,... \in A$ be such that $a_n$ approaches infinity, as $n$ approaches infinity.
Let $P_n=(1,y_n)$ be the point of $\mathbb{R}^2$ where the line segment from the point $(0,1)$ to the point $(a_n,0)$ intersects the vertical line $x=1$.
By definition of $X(A)$, we get that $P_n\in X(A)$, for all $n$.
It's easily shown that the sequence $y_1,y_2,y_3,...$ is a strictly increasing sequence of real numbers such that $y_n$ approaches $1$, as $n$ approaches infinity.
But then, since $X(A)$ is closed, we get $(1,1)$ in $X(A)$, contradiction, since no line segment from the point $(0,1)$ to a point on the $x$-axis passes through the point $(1,1)$.
Hence $A$ is bounded, as claimed.
Then $A\subseteq B$, for some closed, bounded interval $B$.
Since $A\subseteq B$, it follows that $X(A)\subseteq X(B)$.
But $X(B)$ is a closed triangular region, which is clearly bounded.
Hence $X(A)$ is bounded.
Since $X(A)$ is a closed and bounded subset of $\mathbb{R}^2$, $X(A)$ is compact, as was to be shown.