  Muon-spin relaxation (\mu SR) is a sensitive probe of magnetism, but its
utility can be severely limited by the lack of knowledge of the muon
implantation site and the extent to which the muon perturbs its host. We
demonstrate systematically that these problems can be addressed accurately
using electronic-structure calculations. We show that diamagnetic muons
introduce significant short-ranged distortions in ionic insulators that would
lead to systematic errors on magnetic moments determined by \mu SR, and
quantify these. The F--\mu--F complex formed by muons in many fluorides can be
understood as an exotic molecule-in-a-crystal defect with a zero-point energy
larger than that of any naturally-occurring triatomic molecule.
