An optical waveguide is a physical structure that guides electromagnetic waves in the optical spectrum. Common types of optical waveguides include optical fiber and rectangular waveguides. An optical waveguide is a physical structure that guides electromagnetic waves in the optical spectrum. Common types of optical waveguides include optical fiber and rectangular waveguides. Optical waveguides are used as components in integrated optical circuits or as the transmission medium in local and long haul optical communication systems. Optical waveguides can be classified according to their geometry (planar, strip, or fiber waveguides), mode structure (single-mode, multi-mode), refractive index distribution (step or gradient index) and material (glass, polymer, semiconductor). Practical rectangular-geometry optical waveguides are most easily understood as variants of a theoretical dielectric slab waveguide, also called a planar waveguide. The slab waveguide consists of three layers of materials with different dielectric constants, extending infinitely in the directions parallel to their interfaces. Light may be confined in the middle layer by total internal reflection. This occurs only if the dielectric index of the middle layer is larger than that of the surrounding layers. In practice slab waveguides are not infinite in the direction parallel to the interface, but if the typical size of the interfaces is much much larger than the depth of the layer, the slab waveguide model will be an excellent approximation. Guided modes of a slab waveguide cannot be excited by light incident from the top or bottom interfaces. Light must be injected with a lens from the side into the middle layer. Alternatively a coupling element may be used to couple light into the waveguide, such as a grating coupler or prism coupler. One model of guided modes is that of a plane wave reflected back and forth between the two interfaces of the middle layer, at an angle of incidence between the propagation direction of the light and the normal, or perpendicular direction, to the material interface is greater than the critical angle. The critical angle depends on the index of refraction of the materials, which may vary depending on the wavelength of the light. Such propagation will result in a guided mode only at a discrete set of angles where the reflected planewave does not destructively interfere with itself.