Galaxy formation is a research area in astronomy and astrophysics.
There are at least two very good reasons to try to get an understanding for how galaxies form and evolve. Second, we would like to be able to link together the theories for the early Universe with the observations we have today, and get a uniform cosmological description of The Universe. Henceforth, galaxy formation can be said to be a tool for testing cosmological models. They are a combined so called N-body method for self gravitating gas dynamics. This is because the hot gas that is formed in the early Universe cools due to radiation losses, and can thereby form a structure that is compact enough to be comparable with that of galaxies.