Why does sound wave travel faster in a denser medium whereas light travels slower?
§ Sound is a mechanical wave and travels by compression and rarefaction of the medium.
§ Its velocity in an elastic medium is proportional to the square root of Tension in the medium.
§ A higher density leads to more elasticity in the medium and hence the ease by which compression and rarefaction can take place. This way the velocity of sound increases by increase in density.
§ Light on the other hand is a transverse electromagnetic wave.
§ It does not depend on the elastic property of the medium in which it travels.
§ Its velocity in a medium is determined by the electromagnetic (e.g. dielectric) properties of the medium.
§ Effective path length on the other hand is increased by an increase in the density and hence it leads to higher refractive index and lower velocity.
Why S-waves cannot travel through liquids?
§ S-waves are shear waves, which move particles perpendicularly to their direction of propagation.
§ They can propagate through solid rocks because these rocks have enough shear strength.
§ The shear strength is one of the forces that hold the rock together, and prevent it from falling into pieces.
§ Liquids do not have the same shear strength: that is why, if you take a glass of water and suddenly remove the glass, the water will not keep its glass shape and will just flow away.
§ In fact, it is just a matter of rigidity: S-waves need a medium rigid enough to propagate. Hence, S-waves do not propagate through liquids.