In geometry, prism refers to a certain three-dimensional shape: a polyhedron or star polygon connected to an identical shape by rectangular sides. A cube or rectangular box is one example of this type of prism, but instead of having a rectangle on the top and bottom, as in this example, a geometrical prism may also have a triangle, a six-pointed star, or any other many-sided shape. In optics, a prism is a transparent object with smooth, flat sides that refracts light. Many optical prisms are also geometrical prisms, often triangular prisms, but they may also be other shapes. An optical prism is commonly made of glass or clear plastic, but any material may be used as long as it is transparent to the light source that is to be refracted.
When light is refracted, its course is bent due to an obstacle in its pathway. You can see an example of refracted light by placing a pencil in a clear glass of water and observing how it appears to split where the water begins. This happens because water has a higher refractive index than air, so light moves more slowly through water. An optical prism also has a higher refractive index than air, so light passing through it is refracted.
Light of different frequencies or wavelengths travels at different speeds and refracts at different angles as a result. In the visible spectrum, the portion of the electromagnetic (EM) spectrum visible to the human eye, different frequencies of light appear as different colors. Pure white light is a combination of light of many frequencies, so when pure white light shines through a prism, it breaks up into its constituent wavelengths, creating a rainbow effect.
Red, the lowest frequency visible to the human eye, refracts less than violet, the highest frequency visible to the human eye, so red bends at a less severe angle than violet. All the colors in between bend at different degrees, so the prism makes a rainbow out of white light. This is also how rainbows arise in nature, as they occur when the air is full of water vapor that refracts light in a similar way to a prism.
Other types of prisms have different effects on light. In addition to the refractive prism, a prism may be reflective or polarizing. Reflective prisms reflect light, like a mirror, and are used in binoculars, among other applications. A polarizing prism breaks light up into different polarizations, or electromagnetic charges, rather than different frequencies.