Say a person is on a train moving to the right. He then flashes a light upwards perpendicular to the motion of the train. Directly on top of the person there is a mirror. If the light travels in a straight line why does it hit the mirror and bounce back? Why does the light act in a similar way to, say a tennis ball being thrown upward in a moving train? Why doesn't the light travel to the back of the train hitting just to the left of the mirror? If the train is moving to the right and the light is flashed upwards, why do the light also move in a horizontal direction along with the motion of the train? I understand why a tennis ball seems to travel up and down when thrown upwards from the perspective of the person in the moving train. But I don't understand why this is the case for light. Thank you for the help.