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
The Life and Death of Stars
  1. 1From a cloud of gas to the main sequence
  2. 2Giants, white dwarfs, supernovae and black holes
  3. 3Mass decides the path: binary stars and star clusters
  1. Space Science and Astronomy
  2. /The Life and Death of Stars
  3. /From a cloud of gas to the main sequence

Course 8.3·Lesson 1 of 3

From a cloud of gas to the main sequence

A star is born when a cold cloud of gas and dust collapses under gravity. The core of the protostar heats up, and at about ten million kelvin hydrogen fusion starts. The star is then on the main sequence, where gravity and pressure balance. The more massive the star, the brighter it is and the shorter its life.

about 30 min1 simulation2 practice questions
Lesson 1 of 3Show all lessonsHide
The Life and Death of Stars
  1. 1From a cloud of gas to the main sequence
  2. 2Giants, white dwarfs, supernovae and black holes
  3. 3Mass decides the path: binary stars and star clusters

Try the code and the simulations beside the lesson.

Where stars come from

Between the stars there is thin gas and dust. It is about three quarters hydrogen and one quarter helium by mass, with a little dust. In some places it gathers into clouds called nebulae. The clouds where stars form are cold, only about 10 K10\ \text{K}10 K to 20 K20\ \text{K}20 K above absolute zero. Some nebulae glow, because hot young stars light up their gas. These are emission nebulae. Others are dark, because their dust blocks the light of the stars behind them. These are absorption nebulae. The Orion Nebula, below the three stars of Orion's belt, is 130013001300 light-years away. It glows because its new stars light up its outer gas, while the cold, dense cloud behind it is making more stars. You can see it as a faint patch with the naked eye, or with binoculars.

The collapse

A cloud is held up by its own pressure, until something disturbs it. A shock wave from an exploding star or a collision with another cloud can start the collapse. Then gravity wins. A clump of the cloud falls inwards and breaks into smaller clumps. Each clump can make a star, so stars are usually born in groups, called clusters.

Four drawings in a row, from left to right, showing how a star is born. The first is a large, cold, irregular cloud of gas and dust, labelled nebula, with a few clumps in it. The second shows one dense clump pulled inwards by gravity, with arrows pointing to its centre, labelled collapse. The third shows a bright ball at the centre of a flat spinning disc, labelled protostar and disc, with the ball glowing orange and an arrow showing the spin. The fourth shows a steady yellow ball with two arrows, a long one pointing inwards labelled gravity and a long one pointing outwards labelled pressure, of equal length, labelled main-sequence star.

As a clump falls in, it spins faster and flattens into a disc, like a skater who pulls in the arms. The ball in the middle is a protostar. The energy of the falling gas heats it up. At this stage it shines because it is hot and not because of fusion, mostly in infrared. The disc round it can later form planets.

Switching on

The protostar goes on shrinking and heating. When its core reaches about 101010 million kelvin, the nuclei of hydrogen are moving fast enough to come close, in spite of their electric push away from each other. They join, in steps, to make helium. In total, four hydrogen nuclei make one helium nucleus. This is nuclear fusion.

The helium nucleus has a little less mass than the four hydrogen nuclei. About 0.7 %0.7\ \%0.7 % of the mass goes. It becomes energy, by Einstein's rule E=mc2E = mc^2E=mc2. This is why a star can shine for so long. The core of the Sun is at about 151515 million kelvin. Each second the Sun turns

m=Ec2=3.83×1026 J(3.00×108 m/s)2\displaystyle m = \dfrac{E}{c^2} = \dfrac{3.83 \times 10^{26}\ \text{J}}{(3.00 \times 10^{8}\ \text{m/s})^2}m=c2E​=(3.00×108 m/s)23.83×1026 J​
m=4.26×109 kg\displaystyle m = 4.26 \times 10^{9}\ \text{kg}m=4.26×109 kg

of its mass into light. This is 4.264.264.26 million tonnes, every second. It sounds like a lot, but over 101010 billion years it is only 0.07 %0.07\ \%0.07 % of the Sun's mass.

A star that is too small never starts. If the mass is below about 0.080.080.08 times the Sun's, the core never gets hot enough. The object is a brown dwarf. It glows faintly and cools down.

The main sequence

When fusion starts, the star settles down. The hot gas pushes outwards, and gravity pulls inwards. These two are equal, so the star keeps a steady size. A star in this state is on the main sequence. Hydrogen fuses in its core. The star stays in this state for about 90 %90\ \%90 % of its life. The Sun is on the main sequence now. It is about 4.64.64.6 billion years old, and has about 555 billion years to go.

Mass decides everything

How long does a star stay on the main sequence? A more massive star has more fuel. But gravity squeezes its core harder, so the core is hotter and fusion goes much faster. Roughly, the luminosity goes as

L≈M3.5\displaystyle L \approx M^{3.5}L≈M3.5

with LLL and MMM in solar units. A star of 101010 solar masses is about 300030003000 times as luminous as the Sun. It has 101010 times the fuel, but it burns it 300030003000 times as fast. The lifetime is about

t≈10 billion years×ML\displaystyle t \approx 10\ \text{billion years} \times \dfrac{M}{L}t≈10 billion years×LM​
MassLuminosityLifetime
0.50.50.50.090.090.09575757 billion years
111111101010 billion years
101010316031603160323232 million years
25252578 00078\,000780003.23.23.2 million years

The masses and luminosities are in solar units. This is a rough rule, and it is better for stars between 222 and 202020 solar masses. But the main idea is right: the heavier the star, the shorter its life. A star of 0.50.50.5 solar masses lives for longer than the Universe has existed so far, which is 13.813.813.8 billion years.

How much shorter is the life of a star of 444 solar masses than that of the Sun?

Worked example. How long does a star of 2.02.02.0 solar masses live on the main sequence?

  1. The luminosity. L=2.03.5=11.3L = 2.0^{3.5} = 11.3L=2.03.5=11.3 times the Sun.
  2. The lifetime. t=10×2.011.3=1.77t = 10 \times \dfrac{2.0}{11.3} = 1.77t=10×11.32.0​=1.77 billion years.
  3. Check. The star is heavier than the Sun and lives for a shorter time, as it should.

Practise with new numbers

Try it in Python

The program lists the luminosity and the lifetime of stars of different masses.

Predict first. Which star lives for the shortest time? About how many times shorter than the Sun's life is it? Then run it. Check with Show the answer.

1. Add a star of 0.2 solar masses. What is its lifetime, in billions of years?

2. Change the Sun's mass to 1.2. By how many times does its lifetime change?

Common mistakes

  • Thinking that a star burns like a fire. There is no oxygen. A star shines by fusion, in which nuclei join.
  • Thinking that a heavier star lives longer. It has more fuel, but it uses it up very much faster.
  • Saying that a protostar shines by fusion. It shines because the falling gas heats it. Fusion starts later.
  • Forgetting that mass turns into energy. The star does not lose atoms. The fusion makes a helium nucleus that is a little lighter.

Remember these

  • Stars are born in cold clouds of gas and dust, called nebulae. Gravity pulls a clump into a protostar.
  • Fusion of hydrogen to helium starts when the core reaches about 101010 million kelvin.
  • On the main sequence, outward pressure balances gravity. The star spends about 90 %90\ \%90 % of its life there.
  • A heavier star is far more luminous and lives for a much shorter time.

Check yourself

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

  1. What happens in the core of a star that makes it shine?
  1. Why does a protostar shine before fusion has started?
  1. What keeps a main-sequence star from collapsing?
  1. Which lives longer, a star of 0.30.30.3 solar masses or a star of 333 solar masses?

References

  • OpenStax Astronomy 2e, Chapter 21 The Birth of Stars and the Discovery of Planets outside the Solar System, sections 21.1 and 21.2.
  • OpenStax Astronomy 2e, Chapter 22 Stars from Adolescence to Old Age, section 22.1.

Enroll free in The Life and Death of Stars

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)

A star has a mass of 3.0 solar masses. (a) What is its luminosity, in solar units? …Easy · High School (9–10) · by StemPy Lab
The Sun has a luminosity of 3.83 × 10²⁶ W…Medium · High School (9–10) · by StemPy Lab
Only the core of the Sun is hot enough to fuse hydrogen…Hard · High School (9–10) · by StemPy Lab
Next: lesson 2Giants, white dwarfs, supernovae and black holes
← The Life and Death of Stars
← PreviousGiants, white dwarfs, supernovae and black holes →

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)

The life of a star in codePython Lab · by StemPy Lab