The atomic force microscope (AFM) is a critical tool in nanotechnology, allowing researchers to investigate surface properties at the atomic level. It operates by detecting the interaction between a sharp probe and the surface of a sample, which can be analyzed in different modes such as contact, non-contact, and tapping.