Why is it that mechanical waves/longitudinal waves/sound travel faster in a denser/stiffer medium as in steel compared to say air, while EM waves/trasverse waves/light travels slower in a (optically) denser medium as in say glass?
I know that for mechanical waves,$$v \varpropto \sqrt{T}$$, where $T$ stands for Tension
and $$c \varpropto \sqrt{\frac{1}{\epsilon_0\mu_0}}$$
Any physical interpretation might be helpful.
EDIT: What I understand from this is that, since higher tension implies stronger intermolecular interaction, which leads to better conveyance of energy across the material which causes the waves to move faster. But this analogy doesn't fit at all for light waves. Why?