A Star is Born! (and lives and dies...)
Scientists often approximate the universe as a uniform sphere which is completely uniform in density and composition. Now, this might come as a big surprise to you, because one room of your house probably differs greatly from the next, to say nothing of the ocean, the Sun, and the center of the Milky Way Galaxy! However, on the grand cosmic scale, even our Milky Way is a slightly dense dot in a mostly empty universe with vast stretches of nearly empty space.
This image shows the cosmic microwave background. It is a picture of the early universe as captured by through leftover microwave radiation. It is nearly entirely uniform (the different colors represent only tiny differences in density), yet the entire diversity of our universe sprang from this differences. (Credit: Lawrence Berkeley Laboratory)
However, it is within these spaces that many interesting things happen- such as the creation of stars and planets. Stars form within Molecular Clouds, or regions of space which contain a dense concentration of materials, allowing the formation of hydrogen molecules from hydrogen atoms that fuse with each other.
A cloud of gas will resist collapse because the individual molecules are moving along at high speeds. However, as an area within the molecular becomes dense enough, the gravitational strength of the cloud overwhelms the kinetic energy of the gas. The cloud collapses. This is assumed to be the main mechanisms by which a cloud of hydrogen gas is compressed and allow opportunities for these molecules If there is not very much material in the collapsing region (less than 8% of our suns mass, which, in kilograms, about 2 followed by 30 zeros), nothing really happens. Fusion
To understand what happens when there is a dense enough concentration of hydrogen, we need to understand a little bit about nuclear fusion first. It is hard to get the nuclei of two hydrogen molecules to fuse. This is because the nuclei are positively charged and want to avoid each other. However, if they are being forced to “spend time with each other” because they are constantly being collided through gravity, eventually this barrier will be breached, and the two hydrogen nuclei will “fuse” into helium, giving off energy (and neutrons). You may have heard about attempts to create nuclear fusion here on Earth- these attempts center around “confining” hydrogen with a magnetic field so that nuclei are forced to fuse.
Back to stars! If the collapsed cloud is small, there is not enough gravity to force fusion. However with enough matter, the material will eventually become so dense and filled with hydrogen molecules that they will be to undergo nuclear fusion and release energy.
For a more massive star, the temperature will reach close to 20 million degrees Farenheit, allowing hydrogen to fuse to deuterium and then helium. At this point, the energy being emitted by these reactions prop the star up and prevent it from further collapse.
A cartoon demonstration of a proton-proton fusion reaction, the most common fusion reaction in stellar centers (Credit: Wikipedia)Main Sequence
There is an extremely important tool called the Herzsprung-Russell diagram that shows the relationship between the brightness of a star and its temperature.
The diagram shows the main sequence of stars that continue in a continuous line from red dwarves in the lower right to blue supergiants in the upper right. There are branches that lie off of the main sequence, such as the white dwarf, but we will concentrate on the main sequence stars. Our sun is a main sequence star. The more massive a main sequence star is, the brighter and hotter it will be, and the further towards the upper left it will be.Old Age
The fate of main sequence stars of different sizes in shown in the below diagram.
The numbers refer to the mass of the star relative to the sun (1 is the mass of the sun, 15 is a star weighing fifteen times as much as the sun). At the end of their lives, the stars follow the squiggly line, often getting cooler, but brighter by swelling up in size.
Depending on its mass, a star can chug along burning hydrogen into helium for billions of years or more. The smaller stars burn hydrogen at a slower rate and can last longer. For lower mass stars, they slowly cool down as their hydrogen runs out turning into white dwarf stars. More massive stars form red, cooler giants. Ever larger stars can eventually collapse into black holes.