Why a compound microscope flips the image
A standard compound microscope forms a real, inverted image at an intermediate plane. The eyepiece magnifies that image for your eye and normally leaves its orientation inverted relative to the specimen.
Where the inversion occurs
The objective acts as a converging lens system. Rays from opposite sides of a point near the specimen plane cross on their way to the intermediate image. A separate point on the opposite side of the specimen maps to the opposite side of that image.
A simple slide demonstration
Place a prepared letter e slide on the stage. Center it under low power. While looking through the eyepiece, move the slide a little to your right and observe the image move left. Moving the slide toward you produces movement away from you in the view.
Why other instruments may differ
Stereo microscopes and some camera systems use extra optical elements or software to present an upright image. The letter demonstration describes the usual compound optical path. Consult the instrument setup when aligning a specimen or camera.
