Distance between two sets, understanding least upper bound property and applications of it If $A, B ⊂ R^m$ are nonempty sets, then the distance between A and B is defined as
${\rm dist}(A, B)=\inf{|p − q| : p ∈ A , q ∈ B}$
While ${\rm dist}(A, B)$ may not be achieved as the minimum of $|p − q|$ for an actual pair of points in the sets $A$ and $B$, the fact that $\inf S$ is always a number in the closure of $S$ implies that there must exist two sequences of points, $\{p_n\}\subset A$ and $\{q_n\} \subset B$, such that $\lim_{n\to\infty} |p_n − q_n| = {\rm dist}(A, B)$. However, neither $\{p_n\}$ nor $\{q_n\}$ itself need be a convergent sequence.
How come it doesn't need to be a convergent sequence?
I couldn't understand that part.
And $\inf S$ is defined as the maximum element of the set of lower bounds for $S$ right? And my question is :
Would this $\inf S$ always be a member of $S$ closure?, 
Is it also the limit of some sequence in $S$?,
Thanks.
 A: $\renewcommand\dist{\operatorname{dist}}$In general, we may consider the set $D = \{|p - q| : p \in A, q \in B\}$, which is bounded below by $0$. Then $\dist(A,B) = \inf D$, so there is a sequence in $D$ that converges to $\dist(A,B)$; this is equivalent to there being sequences $p_n \in A$ and $q_n \in B$ such that $|p_n - q_n| \to \dist(A,B)$.
But it may not be the case that $\inf D \in D$, even when both sets are closed. If $\inf D \notin D$, and $A$ and $B$ are closed, then given two convergent sequences $p_n$ in $A$ and $q_n$ in $B$, then $\lim p_n \in A$ and $\lim q_n \in B$ because both sets are closed, but $\lim |p_n - q_n| = |\lim p_n - \lim q_n| > \dist(A,B)$ (because $|\lim p_n - \lim q_n| \in D$).
For example, consider these two closed subsets of $\mathbb{R}^2$: $A = \{(x,y) : y \le 0\}$ and $B = \{(x,y) : y \ge e^{-x}\}$. (At this point I suggest drawing these two sets.) Then $D = (0,\infty)$ so $\dist(A,B) = 0$. The two sets are disjoint, so there are no convergent sequences $p_n \in A$ and $q_n \in B$ such that $\lim |p_n - q_n| = |\lim p_n - \lim q_n| = 0$ (for otherwise $\lim p_n = \lim q_n \in A \cap B = \varnothing$). But we can consider the sequences of points $p_n = (n,0) \in A$ and $q_n = (n,e^{-n}) \in B$. The two sequences obviously don't converge, but $|p_n - q_n| = e^{-n} \to 0$. Thus $\dist(A,B) = 0$.
Note: If $A$ is closed and $B$ is compact, then it can be shown that there are points $p \in A$ and $q \in B$ with $|p - q| = \dist(A,B)$. (Proof sketch: Because $B$ is compact there is $q \in B$ with $\dist(A,q) = \dist(A,B)$. Then there is a sequence $p_n \in A$ with $|p_n - q| \le \dist(A,B) + 1/n$. The sequence is contained in the closed and bounded (hence compact) set $\{a : |a-q| \le \dist(A,B)+1\} \cap A$, so it has a convergent subsequence whose limit $p$ satisfies $|p - q| = \dist(A,B)$.)
