Atomic force microscopy (AFM) is a type of high-resolution scanning probe microscope used to image surfaces at the nanoscale. It uses a sharp tip that is attached to a flexible cantilever to measure deflection at a scale of fractions of a nanometer. As the tip is brought near or into contact with a sample surface, forces between the tip and sample lead to deflection of the cantilever that is measured using a laser spot and photodetector. This allows creation of 3D topographic images with high resolution without the need for a vacuum or conductive samples.