When looking it galaxies, it takes little to realize that they come in different shapes- whether they're swirling blue disks like the Milky Way, red spheres, or misshapen, clumpy messes. But why is this?
Generally speaking, there are three types of galaxies. The two most common are 'disk' and 'elliptical', while lenticular galaxies are relatively rare. To begin, disk galaxies, also known as spiral galaxies, are shaped like a fried egg- with a spherical center surrounded by a disk of gas and stars.
They are thought to arise from clouds of hydrogen drawn together by gravity. As hydrogen atoms draw closer into a cloud, it begins to rotate. This causes their collective mass to increase, and their gravitational force to grow until the gas collapses into a swirling disk. Most of the gas within these galaxies sits at their rim, waiting to be brought inwards to feed the formation of stars. So far, disk galaxies are thought to have formed primarily in the later history of the universe.
Meanwhile, elliptical galaxies, unlike disk galaxies, seem to be older and to have more random movement. Thought to be the product of a merger between two galaxies of equal mass, their stars tug on one another with gravity, thus disrupting their orbit. Mergers do not happen quickly, however, usually taking hundreds of millions or billions of years to take shape. Also, not all mergers lead to elliptical galaxies- the Milky Way, for example, has merged with multiple dwarf galaxies yet still maintained its disk shape.
The last type of galaxy- the lenticular variety- is a cross between an elliptical and disk galaxy. So far, theorists suggest that when disk galaxies use up all their gas and can't form any new stars, their existing ones start to interact. As such, they tug on each other to create a shape that looks like a lentil- an elliptical but rotating disk.
Our understanding of galaxies so far has come from thousands of 2D images and other properties, including galaxy color and motion. As such, there are still sizable gaps in our knowledge of how they form and evolve, making them one of the biggest open questions in the field of astronomy and astrophysics.