The operation of microcantilevers is based on the principles of mechanics and resonance. When a force is applied to a microcantilever, it bends or deflects. This deflection can be detected and measured using various techniques, such as optical methods or piezoresistive sensors. In some cases, microcantilevers are designed to resonate at specific frequencies, and changes in their resonant frequency can indicate the presence of external stimuli.