if travelling at the speed of light would it take 1 million years to reach the andromeda galaxy
Intergalactic travel While it takes light approximately 2.54 million years to traverse the gulf of space between Earth and, for instance, the Andromeda Galaxy, it would take a much shorter amount of time from the point of view of a traveler at close to the speed of light due to the effects of time dilation; the time experienced by the traveler depending both on velocity (anything less than the speed of light) and distance traveled (length contraction). Intergalactic travel for humans is therefore possible, in theory, from the point of view of the traveller.[15]
Galaxy In 1922, the Estonian astronomer Ernst Öpik gave a distance determination that supported the theory that the Andromeda Nebula is indeed a distant extra-galactic object.[43] Using the new 100 inch Mt. Wilson telescope, Edwin Hubble was able to resolve the outer parts of some spiral nebulae as collections of individual stars and identified some Cepheid variables, thus allowing him to estimate the distance to the nebulae: they were far too distant to be part of the Milky Way.[44] In 1936 Hubble produced a classification of galactic morphology that is used to this day.[45]