An atomic-force microscope of the present invention may comprise: a sample stage for accommodating a sample; a cantilever to be arranged on the sample and including a probe; a laser for irradiating a laser beam to the cantilever; a photo-detector for receiving the laser beam reflected from the cantilever; a first camera for photographing the sample and the cantilever; a second camera for photographing the cantilever and a laser spot irradiated by the laser; and a processor which is electrically connected to the first camera, the second camera, and the photo-detector and processes data obtained from the photo-detector. A method for operating the atomic-force microscope of the present invention may comprise: a step of sensing the positions of the cantilever and the sample through the first camera; a step of adjusting the position of the sample; a step of sensing the positions of the laser and the cantilever through the second camera; a step of aligning the laser; a step of sensing the position of the laser beam through the photo-detector; and a step of aligning the position of the photo-detector.
展开▼