HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Reading Starlight: Brightness, Distance and Spectra
  1. 1Brightness, luminosity and magnitudes
  2. 2Parallax, the light-year and the parsec
  3. 3Spectra, temperature and the Hertzsprung-Russell diagram
  1. Space Science and Astronomy
  2. /Reading Starlight: Brightness, Distance and Spectra
  3. /Spectra, temperature and the Hertzsprung-Russell diagram

Course 8.2·Lesson 3 of 3

Spectra, temperature and the Hertzsprung-Russell diagram

A spectrum shows the wavelengths in the light of a star. The dark lines tell us which gases are in the star's atmosphere, and the peak of the continuous part tells us its temperature, by Wien's law. Stars are sorted into spectral classes O, B, A, F, G, K and M, from the hottest to the coolest. The H-R diagram plots luminosity against temperature.

about 35 min1 simulation2 practice questions
Lesson 3 of 3Show all lessonsHide
Reading Starlight: Brightness, Distance and Spectra
  1. 1Brightness, luminosity and magnitudes
  2. 2Parallax, the light-year and the parsec
  3. 3Spectra, temperature and the Hertzsprung-Russell diagram

Try the code and the simulations beside the lesson.

Splitting the light

A prism or a grating spreads light into a spectrum, a band of colours. Each wavelength goes to its own place. The spectrum of a star holds a lot of information, so astronomers split starlight with a spectrograph instead of just looking at it.

There are three kinds of spectrum.

  • A continuous spectrum is a smooth band of all colours. A hot solid, a hot liquid or a hot, dense gas gives it. A glowing light bulb is an example.
  • An emission spectrum is a few bright lines on a dark background. A hot gas at low density gives it. The lines are at special wavelengths.
  • An absorption spectrum is a continuous spectrum with dark lines. It comes from a cooler gas in front of a hotter source. The gas takes out light at its own wavelengths.
Three horizontal strips, one above the other, each showing a spectrum from violet on the left to red on the right with the wavelength from 400 to 700 nanometres along the bottom. The top strip is a smooth continuous rainbow with no gaps and is labelled continuous spectrum, from a hot solid or dense gas. The middle strip is black with a few thin bright coloured lines, labelled emission spectrum, from a hot thin gas. The bottom strip is a smooth rainbow crossed by thin dark lines at the same places as the bright lines in the middle strip, labelled absorption spectrum, from a cooler gas in front of a hot source.

Every element has its own pattern of lines, like a fingerprint. Hydrogen has four strong lines in the visible spectrum at 656.3 nm656.3\ \text{nm}656.3 nm (red), 486.1 nm486.1\ \text{nm}486.1 nm (blue-green), 434.0 nm434.0\ \text{nm}434.0 nm (violet) and 410.2 nm410.2\ \text{nm}410.2 nm (violet). Sodium has a pair at 589.0 nm589.0\ \text{nm}589.0 nm and 589.6 nm589.6\ \text{nm}589.6 nm (yellow). Calcium has strong lines in the violet at 393.4 nm393.4\ \text{nm}393.4 nm and 396.8 nm396.8\ \text{nm}396.8 nm.

A star is a hot ball, so its glowing surface gives a continuous spectrum. The cooler gas in the layers above the surface takes out light at its own wavelengths. So a star shows an absorption spectrum, and the dark lines tell us which elements are in its atmosphere. Helium was found in the spectrum of the Sun in 1868, before anyone had found it on the Earth. In 1925 Cecilia Payne showed that stars are made mostly of hydrogen and helium.

Temperature and colour

A hot object gives light of every wavelength, but most of it at one wavelength. Wien's law says that the wavelength of the peak is in inverse proportion to the temperature:

λmax⁡=bT,b=2.898×10−3 m K\displaystyle \lambda_{\max} = \dfrac{b}{T}, \qquad b = 2.898 \times 10^{-3}\ \text{m K}λmax​=Tb​,b=2.898×10−3 m K

The hotter the star, the shorter the wavelength of the peak, and the bluer it looks. The Sun is at T=5770 KT = 5770\ \text{K}T=5770 K, so λmax⁡=502 nm\lambda_{\max} = 502\ \text{nm}λmax​=502 nm, in the middle of the visible range. Betelgeuse is at 3600 K3600\ \text{K}3600 K, so its peak is at 805 nm805\ \text{nm}805 nm, in the infrared, and it looks red. A star at 10 000 K10\,000\ \text{K}10000 K peaks at 290 nm290\ \text{nm}290 nm, in the ultraviolet, and it looks blue-white.

Make the star 333 times hotter. By how many times does the wavelength of the peak change?

Spectral classes

Stars are sorted into classes by their spectra, which means by temperature. The classes are O, B, A, F, G, K, M, from the hottest to the coolest. A way to remember the order is "Oh Be A Fine Star, Kiss Me".

ClassTemperatureExample
Oover 30 000 K30\,000\ \text{K}30000 KZeta Puppis
B10 00010\,00010000 to 30 000 K30\,000\ \text{K}30000 KRigel
A750075007500 to 10 000 K10\,000\ \text{K}10000 KSirius
F600060006000 to 7500 K7500\ \text{K}7500 KProcyon
G520052005200 to 6000 K6000\ \text{K}6000 Kthe Sun
K370037003700 to 5200 K5200\ \text{K}5200 KArcturus
M240024002400 to 3700 K3700\ \text{K}3700 KBetelgeuse

Books give slightly different borders. Each class is split into ten, from 000 to 999, and the Sun is class G2. Class O and B stars look blue, class G yellow, class K orange and class M red. The strength of the lines changes with the temperature. The hydrogen lines are strongest in class A. Very hot stars have no neutral hydrogen to absorb, and in very cool stars the hydrogen is not excited. So we cannot sort stars by their hydrogen lines alone.

Luminosity, radius and temperature

A star shines from its surface. A hotter surface gives much more light for each square metre, in proportion to T4T^4T4. A larger star has more surface, in proportion to R2R^2R2. So

L∝R2T4\displaystyle L \propto R^2 T^4L∝R2T4
LL⊙=(RR⊙)2(T5770 K)4\displaystyle \dfrac{L}{L_\odot} = \left(\dfrac{R}{R_\odot}\right)^2\left(\dfrac{T}{5770\ \text{K}}\right)^4L⊙​L​=(R⊙​R​)2(5770 KT​)4

Compare Betelgeuse, with R=800 R⊙R = 800\,R_\odotR=800R⊙​ and T=3600 KT = 3600\ \text{K}T=3600 K, with the Sun. Then L/L⊙=8002×(3600/5770)4=97 000L/L_\odot = 800^2 \times (3600/5770)^4 = 97\,000L/L⊙​=8002×(3600/5770)4=97000. A star can be cool and still very luminous, if it is huge.

The Hertzsprung-Russell diagram

In about 1910 Ejnar Hertzsprung and Henry Norris Russell plotted the luminosity of stars against their temperature. The result is the Hertzsprung-Russell diagram, or H-R diagram. It is not a picture of the sky. By custom the hottest stars are on the left, so the temperature decreases to the right. The luminosity goes up the page, on a scale where each step is a factor of 101010 or more.

A graph called the Hertzsprung-Russell diagram. The vertical axis is luminosity compared with the Sun, on a scale where each step is a factor of 10, from 0.0001 at the bottom to 1 million at the top. The horizontal axis is surface temperature, from 40 000 kelvin on the left to 2 500 kelvin on the right, so the temperature falls from left to right, and the spectral classes O, B, A, F, G, K and M are marked along the top. A wide band of dots runs from the top left to the bottom right and is labelled main sequence. A group of dots at the top right is labelled giants, and a group above them is labelled supergiants. A group at the bottom left is labelled white dwarfs. Named stars are marked: the Sun in the middle of the main sequence at 5770 kelvin and luminosity 1, Sirius A on the main sequence above and left of the Sun, Proxima Centauri at the bottom right of the main sequence, Betelgeuse among the supergiants at the top right, Rigel among the supergiants near the top, and Sirius B among the white dwarfs.

The stars do not fall everywhere. They gather in regions:

  • The main sequence is a band from the hot, luminous stars at the top left to the cool, faint stars at the bottom right. About 999 in 101010 stars are on it, and so is the Sun.
  • Blue giants are above the main sequence on the hot side: hot and very luminous, so they must be large.
  • Giants are at the top right: cool but luminous, so they must be large.
  • Supergiants are above the giants: the most luminous stars, with radii up to hundreds of times the Sun's.
  • White dwarfs are at the bottom left: hot but faint, so they must be small, about the size of the Earth.

The diagram shows size, too. For a given temperature, a more luminous star must be larger, since L∝R2L \propto R^2L∝R2. So lines of equal radius slope across the diagram from the top left to the bottom right.

Worked example. Sirius B has L=0.025 L⊙L = 0.025\,L_\odotL=0.025L⊙​ and T=25 000 KT = 25\,000\ \text{K}T=25000 K. How big is it?

  1. The rule. R/R⊙=L/L⊙ / (T/5770)2R/R_\odot = \sqrt{L/L_\odot}\,/\,(T/5770)^2R/R⊙​=L/L⊙​​/(T/5770)2.
  2. The numbers. 0.025=0.158\sqrt{0.025} = 0.1580.025​=0.158 and (25 000/5770)2=18.8(25\,000/5770)^2 = 18.8(25000/5770)2=18.8.
  3. The radius. R=0.158/18.8=0.0084 R⊙=5900 kmR = 0.158/18.8 = 0.0084\,R_\odot = 5900\ \text{km}R=0.158/18.8=0.0084R⊙​=5900 km, which is slightly smaller than the Earth.

Practise with new numbers

Try it in Python

The program finds the peak wavelength, the luminosity and the class of five stars.

Predict first. Which star has the shortest peak wavelength? Which is the most luminous? Then run it. Check with Show the answer.

1. Add a white dwarf with R = 0.014 and T = 16000. What is its luminosity?

2. Change the Sun's temperature to 5000. What class and peak wavelength do you get?

Common mistakes

  • Thinking that the dark lines are holes in the star. They are light that was taken out by cooler gas above the surface.
  • Reading the H-R diagram with the temperature increasing to the right. By custom it falls to the right.
  • Saying that a red star must be faint. A red supergiant is very luminous. It is large.
  • Thinking that the colour of a star is its only information. The spectrum also gives the gases and the speed.

Remember these

  • Three spectra: continuous, emission and absorption. A star shows an absorption spectrum.
  • Each element has its own lines. Dark lines in a star tell us which gases are in its atmosphere.
  • λmax⁡=b/T\lambda_{\max} = b/Tλmax​=b/T, so hotter stars are bluer. The classes O, B, A, F, G, K and M run from hot to cool.
  • L∝R2T4L \propto R^2T^4L∝R2T4. On the H-R diagram: main sequence, giants, supergiants and white dwarfs.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. What kind of spectrum does a glowing light bulb give?
  1. Which is hotter, a class B star or a class K star?
  1. A star has a temperature twice that of another, and the same radius. How many times more luminous is it?
  1. In which part of the H-R diagram would you find a star that is hot and very faint?

References

  • OpenStax Astronomy 2e, Chapter 5 Radiation and Spectra, sections 5.3 and 5.4.
  • OpenStax Astronomy 2e, Chapter 17 Analyzing Starlight, sections 17.3 and 17.4, and Chapter 18 The Stars: A Celestial Census, section 18.4.

Enroll free in Reading Starlight: Brightness, Distance and Spectra

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (3)

Betelgeuse has a surface temperature of 3600 K…Medium · High School (9–10) · by StemPy Lab
The spectrum of a star has dark lines at these wavelengths, in nanometres: 393.4, 396.8, 410.2…Medium · High School (9–10) · by StemPy Lab
Sirius B has L = 0.025 Lodot and a surface temperature of 25 000 K…Hard · High School (9–10) · by StemPy Lab
That was the last lessonBack to the course: take the test
← Reading Starlight: Brightness, Distance and Spectra
← Parallax, the light-year and the parsecNext →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

Python Labs (1)

Reading a star's lightPython Lab · by StemPy Lab

Question Sets (1)

Starlight: Concept Check10 questions · by StemPy Lab

Notes (1)

Reading Starlight: Quick RevisionNote · by StemPy Lab