  Magnetic helicity is a conserved quantity of ideal magnetohydrodynamics (MHD)
that is related to the topology of the magnetic field, and is widely studied in
both laboratory and astrophysical plasmas. When the magnetic field has a
non-trivial normal component on the boundary of the domain, the classical
definition of helicity must be replaced by relative magnetic helicity. The
purpose of this work is to review the various definitions of relative helicity
and to show that they have a common origin - a general definition of relative
helicity in multiply connected domains. We show that this general definition is
both gauge-invariant and is conserved in time under ideal MHD, subject only to
closed and line-tied boundary conditions. Other, more specific, formulae for
relative helicity, that are used frequently in the literature, are shown to
follow from the general expression by imposing extra conditions on the magnetic
field or its vector potential.
