  Expanding on an earlier work that relied on linear force-free magnetic
fields, we self-consistently derive the instantaneous free magnetic energy and
relative magnetic helicity budgets of an unknown three-dimensional nonlinear
force-free magnetic structure extending above a single, known lower-boundary
magnetic field vector. The proposed method does not rely on the detailed
knowledge of the three-dimensional field configuration but is general enough to
employ only a magnetic connectivity matrix on the lower boundary. The
calculation yields a minimum free magnetic energy and a relative magnetic
helicity consistent with this free magnetic energy. The method is directly
applicable to photospheric or chromospheric vector magnetograms of solar active
regions. Upon validation, it basically reproduces magnetic energies and
helicities obtained by well-known, but computationally more intensive and
non-unique, methods relying on the extrapolated three-dimensional magnetic
field vector. We apply the method to three active regions, calculating the
photospheric connectivity matrices by means of simulated annealing, rather than
a model-dependent nonlinear force-free extrapolation. For two of these regions
we correct for the inherent linear force-free overestimation in free energy and
relative helicity that is larger for larger, more eruptive, active regions. In
the third studied region, our calculation can lead to a physical interpretation
of observed eruptive manifestations. We conclude that the proposed method,
including the proposed inference of the magnetic connectivity matrix, is
practical enough to contribute to a physical interpretation of the dynamical
evolution of solar active regions.
