Regularity of the free boundary ∂{u > 0} of a non-negative minimum u of the functional % MathType!MTEF!2!1!+-% feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn% hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr% 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq-Jc9% vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0xfr-x% fr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaacbiGaa8xXdi% ablAAiHnaapefabaWaaeWaaeaadaabdaqaaiabgEGirlaa-v8aaiaa% wEa7caGLiWoadaahaaWcbeqaaiaaikdaaaGccqGHRaWkcaWFrbWaaW% baaSqabeaaieaacaGFYaaaaOGaa43XdmaaBaaaleaadaGadaqaaiaa% -v8acaWF+aGaa4hmaaGaay5Eaiaaw2haaaqabaaakiaawIcacaGLPa% aaaSqaaiabfM6axbqab0Gaey4kIipaaaa!4E4E! $$\upsilon \mapsto \int\limits_\Omega {\left( {\left| {\nabla \upsilon } \right|^2 + Q^2 \chi _{\left\{ {\upsilon > 0} \right\}} } \right)} $$ , where Ω is an open set in ℝn and Q is a strictly positive Holder-continuous function, is still an open problem for n ≥ 3. By means of a new monotonicity formula we prove that the existence of singularities is equivalent to the existence of an absolute minimum u* such that the graph of u* is a cone with vertex at 0, the free boundary ∂{u* > 0} has one and only one singularity, and the set {u* > 0} minimizes the perimeter among all its subsets. This leads to the following partial regularity: there is a maximal dimension k* ≥ 3 such that for n 0} is locally in Ω a C1,α-surface, for n = k* the singular set Σ:= ∂{u > 0} − ∂red{u > 0} consists at most of in Ω isolated points, and for n > k* the Hausdorff dimension of the singular set Σ is less than n - k*.