Atomic force microscopy and its advantages and disadvantages are presented in comparison with optical techniques (near-field optical microscopy and optical spectroscopic scatterometry), as well as their mutual cooperation. The methods are analyzed with respect to monitoring rough surfaces, critical dimensions and cross-sectional shapes of patterned nanostructures, and the linewidth and line-edge roughness of patterned elements.