A glass prism is able to produce a spectrum when white light passes through it but a glass slab does not. explain why is it so.
When light passes through glass, it encounters TWO interfaces--one entering and the other leaving. It slows down at the first interface and speeds back up at the second. If the two interface surfaces are parallel to each other, as in a 'slab' of glass, all of the bending (and dispersion) that takes place at the first interfaces is exactly reversed at the second, 'undoing' the effect of the first interface; so although the emerging ray of light is displaced slightly from the entering ray, it travels in the same direction as the incoming ray and all wavelengths that separated at the first interface are re-combined.
If the second interface is NOT parallel to the first, as in a prism, the effects of the first interface are NOT reversed and the colors separated at that interface continue along different paths upon leaving the glass.