An optical switch for switching an optical path by changing the refractive index of the circumference of a light coupling region of a directional coupler is disclosed. Such a change is accomplished by a photochromic compound in the circumferential medium of the light coupling region. Such a photochromic compound when beamed with light of a specific wavelength undergoes a photochromic reaction which changes the refractive index of the circumferential medium of the light coupling region. Such a reaction is reversible when beamed with light of another specific wavelength.