The Physics and Mathematics of MRI