Origin of Structure :
Density enhancements in the early universe (having their origin in quantum fluctuations that expanded to galaxy-sized objects) have two routes to go. They can grow or disperse due to the effects of gravity and the universe expansion.
The `pressure effects' that density enhancements experience are due to the expanding Universe. The space itself between particles is expanding. So each particle is moving away from each other. Only if there is enough matter for the force of gravity to overcome the expansion do density enhancements collapse and grow. Structure could have formed in one of two sequences: either large structures the size of galaxy clusters formed first, than latter fragmented into galaxies, or dwarf galaxies formed first, than merged to produce larger galaxies and galaxy clusters.
The former sequence is called the top-down scenario, and is based on the principle that radiation smoothed out the matter density fluctuations to produce large pancakes. These pancakes accrete matter after recombination and grow until they collapse and fragment into galaxies.
This scenario has the advantage of predicting that there should be large sheets of galaxies with low density voids between the sheets. Clusters of galaxies form where the sheets intersect.
The competing scenario is one where galaxies form first and merge into clusters, called the bottom-up scenario. In this scenario, the density enhancements at the time of recombination were close to the size of small galaxies today. These enhancements collapsed from self-gravity into dwarf galaxies.
Once the small galaxies are formed, they attract each other by gravity and merge to form larger galaxies. The galaxies can then, by gravity, cluster together to form filaments and clusters. Thus, gravity is the mechanism to form larger and larger structures.
Galaxies are the basic unit of cosmology. They contain stars, gas, dust and alot of dark matter. They are the only `signposts' from here to the edge of the Universe and contain the fossil clues to this earlier time.
The formation of galaxies follows the same conceptual framework used to explain the formation and evolution of the large scale structure in the Universe. Density enhancements in the early-universe either grew or dispersed. According to a hybrid top-down/bottom-up scenario that best fits the observations, an assortment of enhancements formed of various sizes. Small, dense ones collapsed first, large ones formed slower and fragmented as they collapsed.
The first lumps that broke free of the Universe's expansion were mostly dark matter and some neutral hydrogen with a dash of helium. Once this object begins to collapse under its own gravity, it is called a protogalaxy. The first protogalaxies appeared about 13-14 billion years ago.
Note that dark matter and ordinary matter (in the form of hydrogen and helium gas at this time) separate at this time. Gas can dissipate its energy through collisions. The atoms in the gas collide and heat up, the heat is radiated in the infrared (light) and the result is the gas loses energy, moves slowly = collapses to the center. Dark matter does not interact this way and continues to orbit in the halo.
Even though there are no stars yet, protogalaxies should be detectable by their infrared emission (i.e. their heat). However, they are very faint and very far away (long time ago), so our technology has not been successful in discovering any at this time.
Formation of the First Stars :
As the gas in the protogalaxy loses energy, its density goes up. Gas clouds form and move around in the protogalaxy on orbits. When two clouds collide, the gas is compressed into a shock front.
The first stars in a galaxy form in this manner. With the production of its first photons by thermonuclear fusion, the galaxy becomes a primeval galaxy.
Star formation sites in primeval galaxies are similar to star forming regions in present-day galaxies. A grouping of young stars embedded in a cloud of heated gas. The gas will eventually be pushed away from the stars to leave a star cluster.
The first stars in our Galaxy are the globular star clusters orbiting outside the stellar disk which contains the spiral arms. Most galaxies with current star formation have an underlying distribution of old stars from the first epoch of star formation 14 billion years ago.
Ellipticals vs. Spirals :
The two most distinct galaxy types are ellipticals and spirals. Ellipticals have no ongoing star formation today, spirals have alot. Assuming that ellipticals and spirals are made from the same density enhancements at the time of recombination, why did they evolve into very difference appearances and star formation rates?
The answer is how rapid their initial star formation was when they formed. If star formation proceeds slowly, the gas undergoes collisions and conservation of angular momentum forms a disk (a spiral). If star formation is rapid and all the gas is used up in an initial burst, the galaxy forms as a smooth round shape, an elliptical.
Gas falling into a spiral disk is slowed by collisions and star formation continues till today. The spiral arms and patterns are due to ongoing star formation, whereas ellipticals used all their gas supplies in an initial burst 14 billion years ago and now have no ongoing star formation.
Stellar Evolution :
Once a first generation of stars is formed, they will evolve through the various stages represented in the HR diagram. The properties of whole galaxy will change as the stellar population becomes older. This is called age evolution.
The most massive stars end their lives as supernova, the explosive destruction of a star. Supernova's occur when a star uses up its interior fuel of hydrogen and collapses under its own weight. The infalling hydrogen from the star's outer envelope hits the core and ignites explosively.
During the explosion, runaway fusion occurs and all the elements in the periodic table past lithium are produced. This is the only method of producing the heavy elements and is the origin to all the elements in your body.
This shell of enriched gas is ejected into the galaxy's gas supply. Thus, the older a galaxy, the more rich its gas is in heavy elements, a process called chemical evolution.
Galaxy Mergers/Interactions :
After their formation, galaxies can still change their appearance and star formation rates by interactions with other galaxies. Galaxies orbit each on in clusters. Those orbits can sometimes cause two galaxies to pass quite close to each other to produce interesting results.
Solid objects, like planets, can pass near each other with no visible effects. However, galaxies are not solid, and can undergo inelastic collisions, which means some of the energy of the collision is transfered internally to the stars and gas in each galaxy.
The tidal forces will often induce star formation and distort the spiral pattern in both galaxies. This mechanism is responsible for a morphological and mass evolution.
If enough energy is transfered internally to the stars, then galaxies may merge. Depending on the epoch of the last major merger a galaxy may end up resembling morphologically a spiral galaxy, or an elliptical galaxy .
From the theoretical point of view, modelling the processes of galaxy formation is a complex task. As we have seen, the physics of galaxy formation deals with the dynamics of stars (gravitational interaction), thermodynamics of gas and energy production of stars, stellar evolution, and galaxy collisions and mergers.
Observationally, the problem of identifying the progenitors of today's galaxy population from its formation at a very early epoch and its evolution till the present is far from trivial.
Future instrumentation for the next generation of large ground-based telescopes and space observatories, however, may allow to observe the formation of the first galaxies at the edge of the universe, and track down their evolution and transformation into today's galaxy population.