We first prove a new separating hyperplane theorem characterizing when a pair of compact convex subsets K,K′ of the Euclidean space intersect, and when they are disjoint. The theorem, referred as distance duality, is distinct from classical separation theorems. Next, utilizing the theorem we develop a substantially generalized and stronger version of the Triangle Algorithm, originally designed for the convex hull membership problem. If δ∗=d(K,K′), the Euclidean distance between the sets, ρ∗ the maximum of their diameters, and ε a prescribed tolerance, the Triangle Algorithm approximates δ∗, or induces a separating hyperplane, or approximates optimal supporting hyperplanes. Specifically, it computes (p,p′)∈K×K′ satisfying any of the following conditions desired:(1) d(p,p′)≤εd(p,v), v∈K, or d(p,p′)≤εd(p′,v′), v′∈K′ (when δ∗=0);(2) the orthogonal bisector of pp′ separates K from K′;(3) d(p,p′)−δ∗≤εd(p,p′) (when δ∗>0);(4) the supporting hyperplanes orthogonal to pp′ satisfy δ∗−d(H,H′)≤εd(p,p′).The corresponding number of iterations to solve these are, O(1∕ε2), O(ρ∗2∕δ∗2), and O(ρ∗2∕δ∗2ε) for the last two, all independent of K,K′. The complexity in each iteration of the first two tasks is computing for a given pair of iterates (p,p′)∈K×K′ a pivot, i.e. v∈K with d(p,v)≥d(p′,v), or v′∈K′ with d(p′,v′)≥d(p,v′). For the last two the complexity of each iteration is either computing a pivot, or supporting hyperplanes (H,H′) orthogonal to pp′. In the worst-case the complexity of each iteration is solving a linear program over K or K′.Special cases include when K and K′ are convex hulls of finite sets, or polytopes described as the intersection of halfspaces. The corresponding problems include, linear and quadratic programming, SVM and more. In separate work we describe computational comparison between Triangle Algorithm, Frank–Wolfe, Gilbert’s Algorithm, SMO, and more. Future work includes extensions to unbounded convex sets, non-Euclidean norms, also combinatorial and NP-complete problems.