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]
Light-year The light-year is a unit of length used to express astronomical distances and measures about 9.5 trillion kilometres or 5.9 trillion miles.[note 1] As defined by the International Astronomical Union (IAU), a light-year is the distance that light travels in vacuum in one Julian year (365.25 days).[2] Because it includes the word "year", the term light-year is sometimes misinterpreted as a unit of time.