  In this paper we take some classical ideas from commutative algebra, mostly
ideas involving duality, and apply them in algebraic topology. To accomplish
this we interpret properties of ordinary commutative rings in such a way that
they can be extended to the more general rings that come up in homotopy theory.
Amongst the rings we work with are the differential graded ring of cochains on
a space, the differential graded ring of chains on the loop space, and various
ring spectra, e.g., the Spanier-Whitehead duals of finite spectra or chromatic
localizations of the sphere spectrum.
  Maybe the most important contribution of this paper is the conceptual
framework, which allows us to view all of the following dualities: Poincare
duality for manifolds, Gorenstein duality for commutative rings, Benson-Carlson
duality for cohomology rings of finite groups, Poincare duality for groups,
Gross-Hopkins duality in chromatic stable homotopy theory, as examples of a
single phenomenon. Beyond setting up this framework, though, we prove some new
results, both in algebra and topology, and give new proofs of a number of old
results.
