Galaxies are primarily classified by their shape. Therefore, the correct option from your list is:
- By their shape
The main types of galaxies based on their shape are:
- Spiral galaxies: Characterized by their spiral structures and arms.
- Elliptical galaxies: These have an ellipsoidal shape and generally contain older stars with less interstellar gas and dust.
- Irregular galaxies: These do not fit into the spiral or elliptical categories and have irregular shapes.
While factors such as size and the age of stars can provide additional information about galaxies, the primary classification method is based on their morphological characteristics.