Quote:

Where do you come up with the galaxy being 2.5 million light years away? Was the number just pulled up out of a hat? After looking through the wikipedia link, it seems they have distances for galaxies well beyond even this one.




Yes. The most distant galaxies visible in the Hubble space telescope (see image below) are almost 40 _billion_ light years away. They are much further away than their light travel distance due to the expansion of the universe.



And how do we know their distances? Astronomy knows more than 30 different methods to measure the distance to a space object. In the case of the Andromeda galaxy, the used distance measurement methods were probably the Cepheid period, and supernovae light curves (I suppose).

But the simplest distance measurement method is the same as for measuring distances on earth: triangulation. If you're interested, here's a detailed description of astronomical distance measurement methods:

http://www.astro.ucla.edu/~wright/distance.htm