Let (X,d) be a complete metric space. We say a set S⊂X is relatively compact if the closure S is compact. Prove that S⊂X is relatively compact if and only if given any sequence {xn}n=1∞ in S, there exists a subsequence {xnk}k=1∞ that converges (in X).