We discuss the formal basis and general advantages of magnetic-field-a
nd-density functional theory (BDFT) for the ground-state magnetic prop
erties of many-electron systems. The ground-state density rho(r) and t
he magnetic field B(r) are the variables appearing in the energy funct
ionals that are the fundamental elements of BDFT. This is in contrast
to the energy functionals of current-and-density functional theory (CD
FT), the most general density-functional way of treating systems in a
magnetic field, where the variables are rho(r) and the ground-state pa
ramagnetic current j(p)(r). Explicit calculations of magnetic properti
es have already been made that can be recognized as belonging to the B
DFT paradigm, which this work therefore puts on a formal foundation. T
here are also aspects of BDFT discussed here that may make it an attra
ctive alternative to the more general CDFT in some situations. In part
icular, we show that Kohn-Sham equations may be derived that use purel
y real orbitals and for which the energy does not separate into para-
and diamagnetic contributions. We also show that in BDFT the zero-fiel
d electron density alone is sufficient to calculate the energy to seco
nd order in the magnetic field. Thus calculation of, e.g., diamagnetic
susceptibilities or chemical shifts can in principle be made directly
from zero-field electron distributions, without any need for the calc
ulation of first-order corrections.