The mathematics of SR time dilation is trivial, it's just Pythagoras' theorem. See
wiki. Also see wiki for
gravitational time dilation and note the bit that says
"where electromagnetic radiation and matter may be equally affected, since they are made of the same essence". For the relativistic muons think in terms of a "ring of light" side-on. It's good for say a zillion rotations before it decays. If it's moving fast the ring of light traces a helical path that you can depict like this /\/\/\/\/\ just like the parallel-mirror light clock. So a zillion rotations takes longer.