While both MFM and AFM use a cantilever-based system, the primary difference lies in their focus. AFM measures topographical features of a sample by detecting forces between the tip and sample surface. In contrast, MFM specifically measures magnetic forces, providing insights into the magnetic properties of the sample. This distinction makes MFM particularly useful for studying materials where magnetic properties are of interest.