Mathematical Foundations of Imaging, Tomography and Wavefield Inversion