Let $(X, d)$ be a metric space. A set $F\subset X$ is closed if and only if for every sequence $\left\{x_n\right\}\subset F$, if $x\in X$ and $x_n\rightarrow x$ then $x\in F$.
Definition of closed set: Set is closed if and only if its complement is open. A Set $U$ is open if and only if $\forall_{x\in U}\exists_{r>0}B(x,r)\subset U$, where $B(x,r)$ is a ball with middle in $x$ and with radius $r$.
It's rather a well-known fact that I used many times while solving problems, but just now I realized that I don't know how to prove it.