When a wave travels in a medium