There Are Barcodes Hidden in Starlight
Look up at a star on a clear night and, to the naked eye, it does not seem to give us very much information.
It is a point of light.
Perhaps it looks slightly blue, yellow or orange. Perhaps it is brighter than another star nearby. But that seems to be about it.
And yet astronomers can use that tiny quantity of light to work out an extraordinary amount about an object that may be hundreds, thousands or even millions of light-years away.
They can determine what elements it contains.
They can estimate its temperature.
They can measure whether it is moving towards us or away from us.
They can sometimes determine how rapidly it is rotating.
They can investigate the gases in the atmosphere of a distant planet.
And in some circumstances they can even infer the presence and strength of magnetic fields.
All of this begins with one deceptively simple idea:
Split the light apart and look carefully at the colours.
That is spectroscopy.
And it is one of the finest examples in science of how careful measurement can reveal information that appears, at first, to be completely inaccessible.
Light Contains More Information Than Our Eyes Can See
When we look at ordinary white light, our eyes simply interpret it as white.
Pass that light through a prism or diffraction grating, however, and something remarkable happens.
The light separates into its component wavelengths.
We see a spectrum.
The familiar visible spectrum runs approximately from:
violet;
blue;
green;
yellow;
orange;
red.
But the spectrum is not always a smooth rainbow.
Sometimes it contains bright coloured lines.
Sometimes it contains dark gaps.
Sometimes certain wavelengths are much stronger than others.
Those details form a kind of scientific fingerprint.
Or, perhaps more accurately for modern students, a barcode.
The pattern tells us something about the atoms, molecules and physical conditions that produced the light.
That is why spectroscopy is such a powerful idea to introduce beyond the normal school syllabus.
Students are not simply observing colour.
They are learning that light carries encoded information about matter.
Start Somewhere Much Closer Than the Stars
One of the best ways to introduce astronomical spectroscopy is not to begin with astronomy at all.
Begin in the laboratory.
Look at ordinary light sources.
Even quite simple equipment can produce surprisingly interesting results.
A diffraction grating, handheld spectroscope or suitably arranged spectrometer can be used to examine:
an incandescent lamp;
an LED lamp;
a fluorescent tube;
a sodium lamp;
daylight;
different coloured LEDs;
computer and television screens.
Students very quickly discover that "white light" is not always produced in the same way.
And that is where the experiment becomes interesting.
An Incandescent Lamp — A Continuous Spectrum
An old-style incandescent lamp works by heating a filament until it becomes extremely hot.
Look at its light through a spectroscope and you see something reasonably close to a continuous rainbow.
There is light across a wide range of visible wavelengths.
This is very different from what we see from many modern sources.
It also gives us a useful introduction to the idea of thermal radiation.
A hot object emits a range of wavelengths.
As its temperature increases, the distribution of those wavelengths changes.
We can see this in everyday life.
A piece of metal being heated may first glow dull red.
At a higher temperature it becomes orange.
Eventually it may appear yellow-white.
Temperature is changing the spectrum.
Stars behave in a related way.
Their colour therefore tells astronomers something about their surface temperature.
A red star is not simply "painted red".
Its colour is connected with its physical temperature.
LEDs — Not All White Light Is the Same
Modern LED lamps provide a particularly good surprise.
Students may expect a white LED bulb to produce the same smooth rainbow as an incandescent lamp.
Often it does not.
Many white LEDs are made using a blue LED together with phosphor materials that convert some of the blue light into longer wavelengths.
Depending upon the lamp, the resulting spectrum may show a strong blue peak combined with a broader region at other wavelengths.
Different LED lamps can produce noticeably different spectra even though they all look white to the human eye.
This immediately gives students an important lesson.
Objects that appear identical to our senses may be physically very different when measured scientifically.
Our eyes integrate many wavelengths together.
A spectroscope separates them again.
Fluorescent Lamps — A Forest of Lines
Fluorescent lighting gives another very different spectrum.
Instead of a smooth rainbow, students are likely to see several particularly bright lines or bands.
These arise from the gases and phosphors involved in producing the light.
Suddenly spectroscopy begins to look much more like a barcode.
There are particular wavelengths present much more strongly than others.
Those wavelengths can act as clues to the substances involved.
This leads naturally towards atomic emission spectra.
Sodium — A Beautiful Demonstration
If a suitable sodium source is available, it provides one of the classic spectroscopy demonstrations.
Sodium produces extremely characteristic yellow emission close to 589 nm.
With sufficient resolution, the familiar yellow region can be resolved into the famous sodium D lines.
The important point for students is not necessarily the precise wavelength.
It is the principle.
Sodium atoms do not emit every possible colour equally.
They produce very specific wavelengths.
Those wavelengths are connected with changes in the energy states of electrons within the atom.
Each element has its own characteristic pattern.
Hydrogen has one pattern.
Helium has another.
Neon has another.
Sodium has another.
That makes spectroscopy a method of chemical identification.
Why Do Atoms Produce Particular Colours?
This is where the experiment begins to connect with atomic physics.
Electrons in atoms are not allowed to possess just any energy.
They occupy particular energy levels.
If an electron moves from a higher energy state to a lower one, energy can be released as a photon.
The energy of that photon is related to its frequency by:
E = hf
where:
E = photon energy
h = Planck's constant
f = frequency
Because only certain energy differences are permitted within the atom, only particular photon energies are produced.
That means only particular frequencies — and therefore particular wavelengths — appear in the spectrum.
The result is a set of spectral lines.
The positions of those lines are characteristic of the element producing them.
It is rather like giving every element its own optical signature.
Emission Lines and Absorption Lines
There are two particularly important types of spectrum to introduce.
Emission spectra
A hot, low-density gas can produce bright lines at specific wavelengths.
Those bright lines show the wavelengths emitted by atoms or molecules in the gas.
Absorption spectra
If continuous light passes through a cooler gas, particular wavelengths may be absorbed.
The spectrum then contains dark lines.
The remarkable thing is that the positions of those dark absorption lines correspond to wavelengths that the same substance can emit.
This becomes enormously important in astronomy.
We cannot travel to a star, scoop up a sample of its atmosphere and bring it back to the laboratory.
But light from deeper, hotter regions of a star passes through cooler material in the star's atmosphere.
Atoms in that atmosphere absorb particular wavelengths.
The resulting dark absorption lines tell us what substances are present.
We read the lines.
The lines tell us the chemistry.
How Do We Know What Stars Are Made Of?
This is perhaps the most extraordinary part of spectroscopy.
Suppose we observe a dark line at a particular wavelength in the spectrum of a star.
How do we know what caused it?
We compare it with laboratory measurements.
Scientists can excite samples of hydrogen, helium, sodium, calcium, iron and many other substances here on Earth.
They measure the wavelengths at which those substances absorb or emit light.
Then they compare those laboratory patterns with spectra from stars.
If the lines match, we have evidence that the same element is present.
This is one of those moments in science that deserves to be appreciated.
The laws of physics appear to work in the same way in a laboratory on Earth and in stars vast distances away.
The sodium atom in a lamp in a laboratory behaves according to the same physics as a sodium atom in the atmosphere of a distant star.
That is a profound idea.
A Wonderful Historical Twist — Helium Was Found in the Sun First
Spectroscopy also produced one of the loveliest stories in the history of science.
During observations of the Sun in the nineteenth century, astronomers noticed a spectral line that did not correspond to any element then known on Earth.
The line was associated with a previously unknown element.
It was named helium after Helios, the Greek Sun god.
Only later was helium identified on Earth.
In other words, an element was detected in the Sun before it was found terrestrially.
A substance nearly 150 million kilometres away was identified using nothing more than the light arriving from it.
That should give students some sense of just how powerful spectroscopy can be.
Temperature Is Written into the Spectrum Too
Spectroscopy does more than reveal composition.
The overall shape of the spectrum contains information about temperature.
Hot objects produce thermal radiation across a range of wavelengths.
As temperature increases, the wavelength at which the radiation is most intense shifts.
Qualitatively:
cooler stars tend to appear redder;
hotter stars tend to appear bluer.
This sometimes surprises students because everyday experience teaches us to associate red with hot and blue with cold.
In astronomy, the opposite applies to stellar colour.
Blue stars are generally hotter than red stars.
For example, the surface temperature of a cool red star may be only a few thousand kelvin, while a hot blue star may exceed 10,000 K.
That is another reason why colour in astronomy is not merely aesthetic.
It is data.
Stars Can Tell Us Whether They Are Moving
Spectroscopy becomes even more impressive when we consider motion.
Suppose we know where a particular hydrogen absorption line should appear.
If the star is moving towards us, its spectral lines may appear shifted slightly towards shorter wavelengths.
This is a blueshift.
If the star is moving away, the lines shift towards longer wavelengths.
This is a redshift.
For relatively low speeds, the relationship can be approximated by:
v / c = change in wavelength / original wavelength
or:
v / c = Δλ / λ
where:
v = radial velocity of the object
c = speed of light
Δλ = change in wavelength
λ = original wavelength
This means astronomers can measure motion along our line of sight without seeing the star physically move across the sky.
Again, the information is hidden inside the light.
Finding Planets Without Seeing Them
This provides a lovely connection with another astronomical topic: exoplanets.
A planet orbiting a star does not simply travel around a perfectly stationary object.
The star and planet actually orbit their common centre of mass.
As a result, the star moves slightly backwards and forwards.
That movement can cause its spectral lines to alternate between tiny redshifts and blueshifts.
This is the radial velocity method of exoplanet detection.
We may never directly see the planet.
Instead we detect the extremely small gravitational effect it has upon its star.
This is a wonderful example of indirect scientific reasoning.
We observe one thing.
We infer another.
Can Spectroscopy Tell Us How Fast a Star Rotates?
It can.
Imagine one side of a rotating star moving towards us while the opposite side is moving away.
Light from one side is slightly blueshifted.
Light from the other side is slightly redshifted.
The combined effect can broaden the spectral lines.
By studying that broadening, astronomers can estimate how rapidly the star is rotating.
This is a much more advanced application, but it is an excellent example to mention because it demonstrates how much information is contained within the precise shape of a spectral line.
Not merely whether a line exists.
Not merely where it is.
But even how wide it is.
Magnetic Fields Can Leave Their Mark as Well
Strong magnetic fields can alter atomic energy levels.
This can cause spectral lines to split into multiple components.
The effect is known as the Zeeman effect.
Astronomers can use this splitting to investigate magnetic fields in stars and other astronomical objects.
At this point spectroscopy has moved far beyond simply identifying chemicals.
The spectrum has become a diagnostic tool for the physical environment.
Composition.
Temperature.
Velocity.
Rotation.
Magnetism.
All encoded in light.
Reading the Atmosphere of Another World
One of the most exciting modern applications of spectroscopy involves exoplanet atmospheres.
Imagine a planet passing in front of its star.
Most of the starlight travels directly towards us.
But a small fraction passes through the planet's atmosphere before reaching our telescopes.
Atoms and molecules in that atmosphere absorb particular wavelengths.
By comparing the spectrum during the transit with the normal stellar spectrum, astronomers can sometimes identify substances in the planetary atmosphere.
Depending upon the planet and the quality of the observations, spectroscopy can reveal signatures associated with substances such as:
water vapour;
sodium;
carbon dioxide;
methane;
other atmospheric gases.
This does not mean that every molecule automatically indicates life.
That is an important scientific caution.
Atmospheric chemistry is complicated, and biological and non-biological processes can sometimes produce similar substances.
But spectroscopy gives us something that would have seemed astonishing only a few generations ago:
the ability to study the atmosphere of a planet orbiting another star.
A Practical Spectroscopy Investigation
This topic lends itself beautifully to a home laboratory, school laboratory or astronomy club.
You do not need a professional observatory to introduce the underlying science.
Equipment
Depending upon what is available, you might use:
a handheld spectroscope;
a diffraction grating;
a simple educational spectrometer;
a camera with a diffraction grating;
suitable spectrum-analysis software;
several different lamps or light sources.
Suitable sources might include:
incandescent filament bulbs;
LED lamps;
coloured LEDs;
fluorescent lamps;
sodium lamps where safely available;
computer displays;
phone or tablet displays;
daylight.
Investigation 1 — Are All White Lights Actually the Same?
Place several apparently white light sources side by side.
For example:
an incandescent lamp;
a warm-white LED;
a cool-white LED;
a fluorescent source.
Look at each through the spectroscope.
Ask students to describe the differences.
They might consider:
Is the spectrum continuous?
Are particular colours stronger?
Are there obvious bright lines?
Are there gaps?
How do two different white LEDs compare?
This is a wonderfully simple experiment because the student's eyes initially say:
"They are all white."
The spectroscope says:
"No, they are not."
That is science in miniature.
Measurement reveals structure that ordinary observation misses.
Investigation 2 — Compare Coloured LEDs
Use red, green and blue LEDs.
Observe their spectra.
A red LED does not simply contain "white light with the other colours removed".
Its output is concentrated into a relatively narrow region of wavelengths.
Students can compare different LED colours and consider why a nominally single-colour light source still has a finite spectral width.
More advanced students could investigate the relationship between LED colour and photon energy.
Because:
E = hf
and:
c = fλ
we can combine them to obtain:
E = hc / λ
Shorter wavelength photons therefore have more energy than longer wavelength photons.
Blue LED photons have more energy than red LED photons.
That provides a useful bridge between visible colour, wave physics and quantum physics.
Investigation 3 — Look at a Computer Screen
This is particularly effective because it connects spectroscopy with something students use every day.
Display a white image on a computer monitor, tablet or television and examine it through a spectroscope.
Depending upon the display technology, students may be able to see separate red, green and blue contributions.
Then display:
red;
green;
blue;
yellow;
cyan;
magenta;
white.
Ask what changes in the spectrum.
Students begin to see that the screen is creating perceived colour by controlling a small number of primary emitters.
White on a display is constructed.
It is not necessarily the same spectrum as white daylight.
Investigation 4 — Match an Unknown Spectrum
This turns the activity into a genuine scientific puzzle.
Provide spectra from several known sources.
Then present an unknown.
Students must identify it by comparing the pattern.
This mimics the basic reasoning astronomers use when identifying chemical elements.
The task can be made increasingly sophisticated.
At first students may simply match obvious patterns visually.
Later they could measure approximate wavelengths.
They could produce a table such as:
| Observed wavelength | Possible element |
|---|---|
| 486 nm | Hydrogen |
| 589 nm | Sodium |
| 656 nm | Hydrogen |
The exact activity will depend upon the resolution of the equipment, but the principle is powerful.
Students are no longer merely observing.
They are interpreting evidence.
Investigation 5 — From Laboratory Spectrum to Stellar Spectrum
This is probably the strongest extension.
Give students a published spectrum of a star.
Provide laboratory reference spectra for several elements.
Ask:
Which elements appear to be present?
Students can look for matching patterns.
One matching line is usually weak evidence.
Several matching lines provide a much stronger case.
That becomes a useful lesson in scientific reasoning.
Scientists do not normally identify a substance because one feature happens to look similar.
They search for a consistent pattern of evidence.
A Further Challenge — Can We Build a Simple Spectrometer?
For students who enjoy engineering as well as astronomy, a homemade spectrometer is an excellent project.
A simple design can use:
a narrow entrance slit;
a diffraction grating;
a dark enclosure;
a camera.
The slit restricts the incoming light.
The diffraction grating separates it by wavelength.
The camera records the spectrum.
With suitable calibration, pixel position across the photograph can be related to wavelength.
Calibration might use a known spectral line from a particular source.
Students then move from merely looking at spectra to actually measuring them.
That is a significant conceptual step.
What Does a Diffraction Grating Actually Do?
A diffraction grating contains a very large number of closely spaced lines.
Light passing through or reflecting from the grating interferes.
Different wavelengths emerge strongly at different angles.
A simplified diffraction-grating relationship is:
nλ = d sin θ
where:
n = diffraction order
λ = wavelength
d = spacing between grating lines
θ = diffraction angle
Students who have studied waves may recognise this as another application of interference.
Spectroscopy therefore connects astronomy with wave physics.
The grating does not somehow "colour" the light.
It separates wavelengths that were already present.
What About Looking at the Sun?
The Sun is obviously an exceptionally interesting source for spectroscopy.
Its spectrum contains thousands of absorption lines.
Historically these dark lines are strongly associated with the work of Joseph von Fraunhofer and are often called Fraunhofer lines.
But this also introduces an essential safety issue.
Never look directly at the Sun through optical equipment
Students should never aim:
a telescope;
binoculars;
magnifying lenses;
cameras with optical viewfinders;
homemade optical systems
directly at the Sun unless the equipment is specifically designed and correctly filtered for solar observation.
Concentrated sunlight can cause permanent eye damage extremely rapidly.
For simple educational spectroscopy, use safely projected sunlight or diffuse daylight rather than direct solar viewing.
This is a topic where the science is fascinating, but correct optical safety must come first.
Why I Like This Experiment So Much
There are some experiments that demonstrate a fact.
And then there are experiments that change how a student thinks about what it means to observe something.
Spectroscopy belongs firmly in the second category.
A student looks at an LED and sees white light.
Then they look through a spectroscope and discover structure.
They look at a fluorescent lamp and discover lines.
They look at a sodium source and discover a characteristic signature.
Then you show them a stellar spectrum.
And suddenly the leap becomes possible.
The same physics applies.
The laboratory is no longer disconnected from astronomy.
The student has effectively learned one of the tools used to investigate the Universe.
That is what I particularly like about practical science.
You can begin with an ordinary lamp sitting on a laboratory bench and finish by discussing what distant stars and planets are made of.
The Bigger Lesson — Science Often Means Learning How to Ask Nature Better Questions
The human eye is an extraordinary instrument, but it has limits.
Looking harder at a star does not tell us very much more.
Building a better question does.
Instead of asking:
"What colour is the star?"
we ask:
"Exactly which wavelengths of light are present?"
Instead of asking:
"Does this star appear to move?"
we ask:
"Have its spectral lines shifted?"
Instead of asking:
"What is its atmosphere made of?"
we ask:
"Which wavelengths have been absorbed?"
This is one of the deeper lessons of science.
Progress often comes not from observing the same thing more intensely, but from inventing a new way to measure it.
A spectroscope gives us a different way of looking.
And once we look in that way, the apparently featureless point of light becomes an extraordinary source of information.
Conclusion — Every Star Is Sending Us a Message
Stars are impossibly distant by everyday standards.
We cannot touch them.
We cannot collect samples from most of them.
We cannot place thermometers in their atmospheres.
We cannot follow them with speed cameras.
Yet they continually send something across space towards us.
Light.
And hidden within that light is information.
Chemical composition.
Temperature.
Motion.
Rotation.
Magnetic fields.
Atmospheric chemistry.
Perhaps even clues about planets orbiting stars that our ancestors did not know existed.
All we have to do is learn how to read it.
A spectrum is therefore much more than a rainbow.
It is a message.
And spread across that message are the barcodes of the Universe.
Questions to Explore
For students who want to take the idea further:
Why does a hot solid produce a different spectrum from a hot low-density gas?
Why do absorption and emission lines for the same element occur at the same wavelengths?
Why are blue stars hotter than red stars?
How can spectral lines reveal the speed of a star?
How can line broadening reveal stellar rotation?
Why might several spectral lines be needed before confidently identifying an element?
How can an exoplanet atmosphere affect the spectrum of its parent star during a transit?
Why would finding oxygen in an exoplanet atmosphere not automatically prove that life exists?
How could you calibrate a homemade spectrometer?
What other parts of the electromagnetic spectrum can astronomers use besides visible light?


