Recently, the study of three-dimensional spaces is becoming of great
interest. In these dimensions the Cotton tensor is prominent as the substitute
for the Weyl tensor. It is conformally invariant and its vanishing is
equivalent to conformal flatness. However, the Cotton tensor arises in the
context of the Bianchi identities and is present in any dimension. We present a
systematic derivation of the Cotton tensor. We perform its irreducible
decomposition and determine its number of independent components for the first
time. Subsequently, we exhibit its characteristic properties and perform a
classification of the Cotton tensor in three dimensions. We investigate some
solutions of Einstein's field equations in three dimensions and of the
topologically massive gravity model of Deser, Jackiw, and Templeton. For each
class examples are given. Finally we investigate the relation between the
Cotton tensor and the energy-momentum in Einstein's theory and derive a
conformally flat perfect fluid solution of Einstein's field equations in three
dimensions.Comment: 27 pages, revtex