  A classical theorem of De Bruijn and Erd\H{o}s asserts that any noncollinear
set of n points in the plane determines at least n distinct lines. We prove
that an analogue of this theorem holds for graphs. Restricting our attention to
comparability graphs, we obtain a version of the De Bruijn-Erd\H{o}s theorem
for partially ordered sets (posets). Moreover, in this case, we have an
improved bound on the number of lines depending on the height of the poset. The
extremal configurations are also determined.
