[proofplan]
We prove the result by passing to complements and using the corresponding characterization of relatively open subsets. If $F$ is closed in $Y$, then $Y\setminus F$ is open in $Y$, so it is an intersection $Y\cap U$ with $U$ open in $X$; the closed ambient set is then $C=X\setminus U$. Conversely, if $F=Y\cap C$ for a closed ambient set $C$, then the complement of $F$ in $Y$ is $Y\cap (X\setminus C)$, which is relatively open in $Y$.
[/proofplan]
[step:Express the complement of a relatively closed set as an ambient open intersection]
Assume first that $F\subset Y$ is closed in the [metric subspace](/page/Metric%20Subspace) $Y$. By the definition of closedness in a [metric space](/page/Metric%20Space), the complement $Y\setminus F$ is open in $Y$.
We apply [citetheorem:8586] to the subset $Y\setminus F\subset Y$. Its hypotheses are satisfied because $(X,d)$ is a metric space and $Y\subset X$. Hence there exists an [open set](/page/Open%20Set) $U\subset X$ such that
\begin{align*}
Y\setminus F=Y\cap U.
\end{align*}
[guided]
Assume that $F\subset Y$ is closed in the metric subspace $Y$. The word “closed” here is being used inside the metric space $Y$, not inside the ambient space $X$. Therefore the first object to examine is the complement of $F$ relative to $Y$, namely $Y\setminus F$. By the definition of closedness in a metric space, $Y\setminus F$ is open in $Y$.
Now we use the open-set characterization for subspaces, [citetheorem:8586]. That theorem applies because the ambient space $(X,d)$ is a metric space and $Y$ is a subset of $X$. We apply it to the subset $Y\setminus F\subset Y$. It gives an open set $U\subset X$ such that
\begin{align*}
Y\setminus F=Y\cap U.
\end{align*}
This is the key conversion: closedness of $F$ in $Y$ has been turned into openness of an ambient set $U$ whose intersection with $Y$ is exactly the complement of $F$ inside $Y$.
[/guided]
[/step]
[step:Take the ambient complement to obtain the required closed set]
Define the set $C\subset X$ by
\begin{align*}
C=X\setminus U.
\end{align*}
Since $U$ is open in $X$, the set $C$ is closed in $X$. We compute, using $F\subset Y$ and $Y\setminus F=Y\cap U$,
\begin{align*}
Y\cap C=Y\cap (X\setminus U).
\end{align*}
This is the complement in $Y$ of $Y\cap U$, so
\begin{align*}
Y\cap C=Y\setminus (Y\cap U).
\end{align*}
Using $Y\cap U=Y\setminus F$, we obtain
\begin{align*}
Y\cap C=Y\setminus (Y\setminus F).
\end{align*}
Because $F\subset Y$, the last set is $F$. Hence
\begin{align*}
F=Y\cap C.
\end{align*}
This proves the forward implication.
[/step]
[step:Show that an ambient closed intersection is relatively closed]
Conversely, assume that there exists a [closed set](/page/Closed%20Set) $C\subset X$ such that
\begin{align*}
F=Y\cap C.
\end{align*}
Define the set $G\subset X$ by
\begin{align*}
G=X\setminus C.
\end{align*}
Since $C$ is closed in $X$, the set $G$ is open in $X$. We compute the complement of $F$ in $Y$:
\begin{align*}
Y\setminus F=Y\setminus (Y\cap C).
\end{align*}
By elementary set algebra,
\begin{align*}
Y\setminus (Y\cap C)=Y\cap (X\setminus C).
\end{align*}
Therefore
\begin{align*}
Y\setminus F=Y\cap G.
\end{align*}
Applying [citetheorem:8586] to the open set $G\subset X$, the set $Y\cap G$ is open in the metric subspace $Y$. Hence $Y\setminus F$ is open in $Y$, so $F$ is closed in $Y$ by the definition of closedness. This proves the reverse implication and completes the proof.
[/step]