Atomic force microscopy (AFM) is a technique wherein an atomically sharp needle raster scans across a surface, detecting forces between it and the sample. In state-of-the-art AFM experiments the measured forces are typically on the order of pico-Newtons, and the lateral resolution is on the order of pico-meters. This enables sub-molecular resolution imaging of single molecules and atomic resolution on surfaces. The push for smaller and smaller electronic devices as well as the need for better catalysts for the chemical industry necessitates a better understanding of molecules and surfaces on the atomic scale. AFM is uniquely equipped to face these challenges and this thesis provides new insights in the scope of questions that AFM can help a...