  It is shown that any spatially flat and isotropic universe undergoing
accelerated expansion driven by a self-interacting scalar field can be directly
related to a contracting, decelerating cosmology. The duality is made manifest
by expressing the scale factor and Hubble parameter as functions of the scalar
field and simultaneously interchanging these two quantities. The decelerating
universe can be twinned with a cosmology sourced by a phantom scalar field by
inverting the scale factor and leaving the Hubble parameter invariant. The
accelerating model can be related to the same phantom universe by identifying
the scale factor with the inverse of the Hubble parameter. The duality between
accelerating and decelerating backgrounds can be extended to spatially curved
cosmologies and models containing perfect fluids. A similar triality and
associated scale factor duality is found in the Randall-Sundrum type II
braneworld scenario.
