Why is this subset of a metric space closed in $X$? Let $X=(0,2]$ with the standard metric $d(x,y)=|x-y|$ and let $A=(0,1]$.
I have to show that $A$ is closed in $X$ (which I can do by considering a sequence in $A$ and showing that it has its limit in $X$) and in the solutions I have the following answer:
"$X$ is a subspace of the metric space $\mathbb{R}$ and $A=[0,1]\cap X$. Since $[0,1]$ is closed in $\mathbb{R}$ it follows that $A$ is closed in $X$."
Could somebody explain this answer to me as I am a bit confused by it.
Thanks very much for any help.
 A: Based on the OPs comment it seems that he is satisfied with what he was told in the comments. I'll summarize it here, so that this question does not remain unanswered - see meta. (I'm posting it as CW, so feel free to improve it; or post a new answer if something is missing here.)
An important point pointed out in Chris Eagle's comment is the fact, that the topology on $(0,2]$ given by the metric $d(x,y)=|x-y|$ is the same as the subspace topology induced by the usual topology on $\mathbb R$, see e.g. this question: Long proof of equivalence of subspace and metric topology
By definition of subspace topology: Suppose that $X$ is a subspace of $(Y,\tau)$. A subset of $X$ is open in the subspace topology if and only if it is the intersection of $X$ with an open set in $(Y,\tau)$. From this we can show easily that a subset of $X$ is closed in the subspace topology if and only if it is an intersection of a closed subset of $Y$ with $X$.
A detailed proof can be found at proofwiki: Closed Sets in Topological
Subspace.
From the above we now see that $A=[0,1]\cap (0,2]$ is an intersection of a set $[0,1]$, which is closed in $\mathbb R$, with the subspace $(0,2]$. Hence it is closed in the subspace topology.
