I have a question about the light observed from galaxies that are moving away from us due to the expansion of the universe. I understand that we can tell they are moving away because the light from these galaxies is red shifted. I was wondering how this red shift is generated, exactly. Is the light red shifted because the space that the light travels through is expanding? Or is it red shifted for the same reason that a sound source moving away from you is shifted to lower tones?