  We present a novel analysis of semidefinite programs (SDPs) with positive
duality gaps, i.e. different optimal values in the primal and dual problems.
These SDPs are extremely pathological, often unsolvable, and also serve as
models of more general pathological convex programs. However, despite their
allure, they are not well understood even when they have just two variables.
  We first completely characterize two variable SDPs with positive gaps; in
particular, we transform them into a standard form that makes the positive gap
trivial to recognize. The transformation is very simple, as it mostly uses
elementary row operations coming from Gaussian elimination. We next show that
the two variable case sheds light on larger SDPs with positive gaps: we present
SDPs in any dimension in which the positive gap is caused by the same structure
as in the two variable case. We analyze a fundamental parameter, the {\em
singularity degree} of the duals of our SDPs, and show that it is the largest
that can result in a positive gap.
  We finally generate a library of difficult SDPs with positive gaps (some of
these SDPs have only two variables) and present a computational study.
