The book aims to give a mathematical presentation of the theory of general relativity (that is, spacetime-geometry-based gravitation theory) to advanced undergraduate mathematics students. Mathematicians will find spacetime physics presented in the definition-theorem-proof format familiar to them. The given precise mathematical definitions of physical notions help avoiding pitfalls, especially in the context of spacetime physics describing phenomena that are counter-intuitive to everyday experiences.In the first part, the differential geometry of smooth manifolds, which is needed to present the spacetime-based gravitation theory, is developed from scratch. Here, many of the illustrating examples are the Lorentzian manifolds which later serve as spacetime models. This has the twofold purpose of making the physics forthcoming in the second part relatable, and the mathematics learnt in the first part less dry. The book uses the modern coordinate-free language of semi-Riemannian geometry. Nevertheless, to familiarise the reader with the useful tool of coordinates for computations, and to bridge the gap with the physics literature, the link to coordinates is made through exercises, and via frequent remarks on how the two languages are related.In the second part, the focus is on physics, covering essential material of the 20th century spacetime-based view of gravity: energy-momentum tensor field of matter, field equation, spacetime examples, Newtonian approximation, geodesics, tests of the theory, black holes, and cosmological models of the universe.Prior knowledge of differential geometry or physics is not assumed. The book is intended for self-study, and the solutions to the (over 200) exercises are included.