The Science of Light: Rainbow Use Case
A question I like to ask to gauge one’s understanding of the universe is the following: “Is mathematics discovered or invented?” The difference in answer determines the index of objectivity a person possesses when observing the laws of nature. To my belief, duh, mathematics was discovered. Mathematics is the language of the universe, and both cannot exist without one another. Humans discovering mathematics is the byproduct of observing fundamental patterns which govern everyday life.
Consider Newton’s legendary encounter with an apple — an event that, while likely apocryphal, symbolizes the moment of realization leading to the discovery of gravity. This observation of natural phenomena sparked his development of calculus, a monumental leap in mathematics. Calculus, unlike algebra which calculates the slope of a straight line between two points, focuses on calculating the slope of a curved line.
Newton’s pioneering work in calculus began with the derivative function f’(x), which provides the slope at any given point of a function f(x). This process of determining the slope or the derivative of a curve is known as ‘Differential Calculus.’ Alongside Differential Calculus, Integral Calculus — concerned with the area under curves — formed the twin pillars of this mathematical revolution. These tools are not only foundational in classical physics but also crucial in modern applications such as machine learning and artificial intelligence.
Newton’s discoveries in mathematics were sophisticated and essential for the advancement of human knowledge and societal progress. However, let’s dive deeper into the applications of calculus for another time, and instead let’s pivot to another of Newton’s groundbreaking discoveries: the diffraction of light through a prism, revealing the visible spectrum.
My Odd Curiosity
Many of my friends know, Natasha is a weird one. I’d like to rebuttal with what even defines weird? If the fact of me finding every opportunity to bend light in a way that creates a rainbow classifies me as weird, then so be it! What can I say, I like being an allegory to the pot of gold at the end of the gorgeous diffraction of white light, which my friends indeed can agree I share the similarity. Below are a few pictures of my weird obsession.

Whether it's while I'm watering my garden, or walking through the streets, I always manage to find a way to form a rainbow. How do I do it, you may ask? Well… I want to say MAGIC! But really it is science — which I will demystify in the remainder of this blog post.

A Treatise of the Reflexions, Refractions, Inflections and Colors of Light
Newton’s groundbreaking book, “Opticks: or, a Treatise of the Reflexions, Refractions, Inflexions, and Colours of Light,” published in 1704, laid the foundation for our modern understanding of light and color. In this seminal work, Newton meticulously described his experiments with prisms, demonstrating that white light is composed of a spectrum of colors. He explored the nature of light, its behavior when passing through various media, and how it can be separated into its constituent colors.
One of the most famous experiments documented in “Opticks” involved passing sunlight through a glass prism. Newton observed that the prism dispersed the light into a range of colors: red, orange, yellow, green, blue, indigo, and violet. This spectrum, which we commonly refer to as a rainbow, proved that white light is not a single color but a combination of many. Newton’s experiments contradicted the prevailing belief that white light was fundamental and colors were created by adding something to the light.
Furthermore, Newton’s work went beyond merely describing this phenomenon. He delved into the principles of refraction and reflection, explaining how light bends when it passes from one medium to another, such as from air into glass. This bending of light, or refraction, occurs because light travels at different speeds in different media. When light enters a denser medium at an angle, it slows down and bends towards the normal line, an imaginary line perpendicular to the surface at the point of entry. Upon exiting the medium, it speeds up and bends away from the normal line.
Newton also explored the concept of inflection, or diffraction, where light bends around obstacles and spreads out. This phenomenon further demonstrated the wave-like properties of light, which was a crucial step in understanding the dual nature of light as both a particle and a wave.
Newton’s groundbreaking discoveries in the realm of light and color forever changed our perception of the world, illuminating the path for generations of scientists, innovators, and dreamers to come. His meticulous experiments and the theoretical framework he developed in “Opticks” provided a comprehensive understanding of optical phenomena and laid the groundwork for future advancements in physics and optics. From the development of optical instruments like telescopes and microscopes to modern technologies such as lasers and fiber optics, Newton’s insights continue to influence and inspire.
A Spherical Water Droplet
The formation of a rainbow in nature is a captivating display of light interacting with tiny, spherical water droplets suspended in the atmosphere. Each droplet acts as a miniature prism, refracting and reflecting sunlight in a mesmerizing way. This natural phenomenon beautifully demonstrates the principles of refraction and reflection, akin to Newton’s experiments with prisms.
When sunlight encounters a water droplet, it undergoes refraction as it enters the droplet due to the change in medium from air to water. The light slows down and bends upon entering the droplet. This bending of light occurs because water is denser than air, causing a change in the light’s speed and direction. As the light travels through the droplet, it hits the inner surface and is reflected back. The reflected light exits the droplet, bending again as it moves from water back into air.
This series of refractions and reflections separates the white light into its component colors. Each color bends at a slightly different angle due to its wavelength, a phenomenon known as dispersion. Shorter wavelengths (blue and violet) bend more than longer wavelengths (red and orange), creating a spread of colors that we perceive as a rainbow.
The geometry of the water droplet and the angles of refraction and reflection are critical in producing the rainbow’s circular arc. For a primary rainbow, light typically undergoes one internal reflection within the droplet before exiting. The angle between the incoming sunlight and the outgoing light that reaches the observer’s eye is around 42 degrees for the most vivid colors, known as the critical angle for rainbow formation.
This intricate interplay of light and water droplets results in the breathtaking spectrum of colors we observe as a rainbow. The vivid display is a testament to the natural beauty and complexity of the physical world, illustrating the fundamental principles of optics in a way that has fascinated humans for centuries.

The Magic Number 42
The appearance of a rainbow is governed by the precise interplay of light, water, and geometry. One of the key principles at play is Snell’s law, which was formally described by Dutch mathematician Willebrord Snellius in 1621, but also independently discovered by Thomas Harriot and René Descartes. Snell’s law describes the relationship between the angles of incidence and refraction when light passes through different media, such as air and water. This law was pivotal in Newton’s understanding of the refraction and dispersion of light through prisms, which he extensively explored in his book “Opticks.”
Building upon Snell’s law, Newton was able to mathematically analyze the behavior of light as it passed through different media and quantify the dispersion of white light into its constituent colors. This understanding allowed him to explain the formation of the spectrum of colors observed when light is refracted through a prism or a water droplet.
The magic number that unlocks the secrets of the rainbow is 42 degrees. This is the angle between the direction of the incoming sunlight and the line connecting the observer’s eye to the center of the rainbow arc. At this specific angle, light undergoes a phenomenon called total internal reflection within the water droplets. During this process, light is reflected off the inside surface of the droplet and then exits, bending once more as it leaves the water and re-enters the air.
Total internal reflection at this angle results in the most vivid and intense colors of the rainbow. The dispersion of light into its component colors due to different refraction angles for different wavelengths creates the beautiful spectrum we see. Red light, which bends the least, is seen on the outer edge of the rainbow, while violet, which bends the most, appears on the inner edge.
The precise angle of 42 degrees is crucial for the formation of a primary rainbow. If the angle were different, the light would not undergo the necessary total internal reflection to produce the vivid array of colors. This geometrical and optical precision is what makes rainbows not only a beautiful natural spectacle but also a fascinating subject of scientific inquiry.

Rainbow Math
### Snell's Law
Snell's Law describes the relationship between the angle of incidence (\(\theta_i\)) and the angle of refraction (\(\theta_r\)) when light passes from one medium into another. It is given by the formula:
\[ n_1 \sin(\theta_i) = n_2 \sin(\theta_r) \]
where:
- \( n_1 \) is the refractive index of the first medium (air, in most cases).
- \( n_2 \) is the refractive index of the second medium (water, in this case).
- \( \theta_i \) is the angle of incidence.
- \( \theta_r \) is the angle of refraction.
### Application to Rainbows
When sunlight enters a water droplet, it undergoes refraction, reflection, and then refraction again as it exits the droplet. Let's see how Snell's Law helps explain these processes.
#### Entering the Droplet
Light enters the water droplet at an angle \(\theta_i\) relative to the normal (perpendicular to the surface). The refractive index of air (\( n_1 \)) is approximately 1, and the refractive index of water (\( n_2 \)) is about 1.33 for visible light. Using Snell's Law:
\[ \sin(\theta_i) = 1.33 \sin(\theta_r) \]
Solving for \(\theta_r\):
\[ \theta_r = \sin^{-1}\left(\frac{\sin(\theta_i)}{1.33}\right) \]
#### Inside the Droplet
Once inside, the light reflects off the inner surface of the droplet. The angle of reflection equals the angle of incidence inside the droplet.
#### Exiting the Droplet
When the light exits the droplet, it again refracts. This time, it moves from water (\(n = 1.33\)) back to air (\(n = 1\)). The angle of incidence inside the droplet now becomes the angle of refraction, and we can use Snell's Law again:
\[ 1.33 \sin(\theta_{r2}) = \sin(\theta_{i2}) \]
Solving for the exit angle \(\theta_{i2}\):
\[ \theta_{i2} = \sin^{-1}\left(1.33 \sin(\theta_{r2})\right) \]
### Critical Angle for Total Internal Reflection
For a primary rainbow, the critical angle for total internal reflection inside the water droplet is around 42 degrees. This means that for light to undergo total internal reflection inside the droplet, the angle of incidence inside the droplet must be greater than the critical angle.
The critical angle \(\theta_c\) can be calculated using:
\[ \sin(\theta_c) = \frac{n_2}{n_1} \]
Given \( n_2 = 1 \) (air) and \( n_1 = 1.33 \) (water):
\[ \sin(\theta_c) = \frac{1}{1.33} \approx 0.75 \]
\[ \theta_c = \sin^{-1}(0.75) \approx 48.6^\circ \]
### Angle of Dispersion and Rainbow Formation
The angle at which the light exits the droplet determines the colors seen in the rainbow. Due to dispersion, different wavelengths (colors) of light bend by different amounts. The angle of deviation (\(\delta\)) for each color can be found by:
\[ \delta = \theta_i + \theta_{i2} - 2\theta_r \]
For a rainbow, the angle between the direction of incoming sunlight and the outgoing light that reaches the observer's eye is typically around 42 degrees, which is why we see the primary rainbow at this angle.
### Summary
Using Snell's Law, we can understand the refraction of light entering and exiting a water droplet, and how total internal reflection inside the droplet contributes to the formation of a rainbow. The critical angle for total internal reflection and the dispersion of light into its component colors at specific angles (around 42 degrees) explain why we see rainbows in their characteristic arc.
This mathematical explanation enhances our understanding of the beautiful and intricate phenomenon of rainbows.
Conclusion: Light, Raindrops, and the Observer
Rainbows are a beautiful testament to the wonders of light and physics. They remind us that even everyday phenomena are governed by the profound and elegant laws of nature. Understanding these principles not only enriches our appreciation of natural beauty but also connects us to the larger tapestry of the universe.
Now that you know the science behind these stunning natural displays, why not try creating your own rainbow? Here are some creative and simple ways to experiment with rainbows using light and various mediums:
- Glass Prisms: Use a glass prism to refract sunlight or a strong beam of light indoors. Rotate the prism to find the perfect angle and watch a beautiful spectrum of colors emerge.
- Water Spray: On a sunny day, use a garden hose with a fine mist setting to create a spray of water droplets. Stand with your back to the sun and look for the rainbow in the mist.
- Crystal Ornaments: Hang crystal ornaments in a sunny window. The cut facets of the crystal will act like tiny prisms, casting rainbows around the room.
- Smartphone Flashlight and Glass: Shine your smartphone flashlight through a glass of water. Adjust the angle to see a mini-rainbow projected onto a surface.
Be creative in how you observe and create rainbows — experiment with different materials and light sources. Share your experiences, capture the moments, and join a community of curious minds exploring the marvels of light. Let’s chase the end of the rainbow together, discovering joy and inspiration in every colorful arc that graces our consciousness.