A highly reliable optical switch which can output (switch) accurately to
an optical fiber for output without being affected by a change in an
environment and a change due to an elapsed time is provided. The optical
switch includes a first spectroscope which separates spatially light from
an optical fiber for input according to a wavelength and a mirror array
which includes a plurality of mirrors which reflect separated light and
an angle of each of the mirrors can be controlled independently by an
electric signal. The optical switch further includes An optical branching
device which extracts a part of an output light from the optical fiber
for output, an optical fiber for monitoring which guides apart of output
light extracted by the optical branching device, a second spectroscope
which separates spatially light from the optical fiber for monitoring
according to a wavelength, and a photodetector array which can detect
lights of different wavelengths separated at the second spectroscope.