SMS: The mathematics of diffusion