The resonant frequency of flexural vibrations for an atomic force microscope (AFM) cantilever has been investigated using the Euler-Bernoulli beam theory. The results show that for flexural vibration the frequency is sensitive to the contact position, the first frequency is sensitive only to the lower contact stiffness, but high order modes are sensitive in a larger range of contact stiffness. By increasing the height H, for a limited range of contact stiffness the sensitivity to the contact stiffness increases. This sensitivity controls the image contrast, or image quality. Furthermore, by increasing the angle between the cantilever and sample surface, the frequency decreases.