Text this: Mathematical foundations of imaging, tomography and wavefield inversion