These notes were written for the summer school on "Recent stability issues for linear dynamical systems -Matrix nearness problems and eigenvalue optimization" organized by Nicola Guglielmi and Christian Lubich at the Centro Internazionale Matematico Estivo (CIME) in September 2021; see http://php.math.unifi.it/users/cime/Courses/2021/course.php?codice=20216.Slides The slides presented during the summer school are available from https://www.dropbox. com/s/b33wd0j9pyiflar/CIME_Gillis_slides.pdf?dl=0.Acknowledgments We are grateful to Nicola Guglielmi and Christian Lubich for giving us the opportunity to present our work at the CIME.We thank our collaborators, Volker Mehrmann, Michael Karow and Neelam Choudhary for the fruitful and enjoyable moments spent working on these problems.