What is the distance between $[1,2)$ and $(2,4]$? I know that $d(A,B)>0$ if two sets do not intersect. However what is the distance if two sets are very close two each other like $[1,2)$ and $(2,4]$?
 A: I thought I would summarize the comments so that the question can have an answer.
The definition of distance between subsets of a metric space is: $$d(A,B) = \inf \{d(a,b) \mid a \in A,\ b \in B\}$$
If $A = [1,2)$ and $B = (2,4]$, both as subsets of $\mathbb{R}$ with its usual metric $d(a,b) = |a-b|$, what is $d(A,B)$?
You are correct that if sets $E$ and $F$ have a common point $x$, then $d(E,F) = 0$.  Because you can count $x$ as both a point in $E$ and in $F$, and $d(x,x) =0$.    But the converse—that $E \cap F = \emptyset \implies d(E,F) > 0$ is not true.
Why would the definition (falsely) “suggest” that the distance between disjoint sets is positive?  Because $d(a,b) > 0$ whenever $a \neq b$.  But as JMoravitz points out, the infimum of a set of positive numbers need not be a positive number.  And Shubham Johri ever-so-succinctly provides an explicit pair of sequences $a_n \in A$, $b_n \in B$, such that $d(a_n,b_n) > 0$ for all $n$, but $\lim_{n \to\infty} d(a_n,b_n) = 0$.  This means that $d(A,B) = 0$.
This illustrates an important property of the real numbers—they are dense in the sense for any $x,y \in \mathbb{R}$ with $x < y$ there exists $z$ such that $x < z < y$.  Such is not the case for integers, and indeed, for subsets of $\mathbb{Z}$, $d(A,B) =0 \iff A \cap B \neq \emptyset$.
