Subset $A$ of segment $(0,1]$ with Euclidean topology is compact $\Leftrightarrow$ $X(A)$ is compact on the Euclidean plane Let:

*

*$I(p,q)$ - closed segment with ends $p,q\in \mathbb R^2$

*$A\subset (0,1]$

*$X(A)=\bigcup \{I \Big( (0,\frac 1x),(x,-\frac 1x) \Big):x\in A \}$
Prove that: subset $A$ of segment $(0,1]$ with Euclidean topology is compact $\Leftrightarrow$ $X(A)$ is compact on the Euclidean plane $\Leftrightarrow$ $X(A)$ is closed on the Euclidean plane
I know the definition of compactness and various theorems, but I don't know how to go about such tasks. Would there be anyone who would be willing to provide a sketch of the reasoning or provide tips that might help me? This is not a homework or an exam. I just prepare for the exam session by doing the tasks from previous years, and because I have very poor lessons, I can't handle them too much and I would like to have at least one model solution to try to draw conclusions for other tasks.
 A: The closed segment $I(p,q)$ has a closed definition. Let $I=[0,1]$ be the standard unit interval. Then
$$I(p,q)=\big\{t\cdot p+(1-t)\cdot q\ \big|\ t\in[0,1]\big\}\subseteq\mathbb{R}^2$$
With that we have:
1) $A$ is compact $\Rightarrow$ $X(A)$ is compact
For $x\neq 0$ denote $v(x)=(0,\frac{1}{x})$ and $w(x)=(x,-\frac{1}{x})$. Both are continuous functions over $\mathbb{R}\backslash\{0\}$. This implies that $X(A)$ is a continuous image of $A\times I$ via $$(x,t)\mapsto t\cdot v(x)+(1-t)\cdot w(x)$$ Since $A$ is compact, then so is $A\times I$ and thus its image $X(A)$.
2) $X(A)$ is compact $\Rightarrow$ $X(A)$ is closed
Obvious. Every compact subset of a Hausdorff space is closed.
3) $X(A)$ is closed $\Rightarrow$ $A$ is compact
First of all there is $\epsilon >0$ such that if $(0,1/x)\in X(A)$ then $x>\epsilon$. Because otherwise $(0,0)$ would be a limit point of $\{(0,1/x)\}_{x\in A}$. But then $(0,0)$ would have to belong to $X(A)$ since we assumed it is closed, which is impossible by the definition of $X(A)$.
This implies that $A\subseteq [\epsilon, 1]$ and so $X(A)$ is bounded. And therefore compact as a closed and bounded subset of Euclidean space.
Now the subset $Y=\big\{(x,y)\in A\ \big|\ x=0\big\}$ is a closed subset of $X(A)$. Furthermore $A$ is the image of $Y$ via $(x,y)\mapsto y$. Since $X(A)$ is compact then so is $Y$ and therefore $A$.
