This class provides a rigorous introduction to the theoretical foundations of calculus and functions of a real variable. The 19th century saw the rise of applied problems in mathematics for which the previously accepted notions of function, continuity, differentiability, and integrability proved woefully inadequate. In this course we will explore the reasons for concern and put on a firm footing the basic concepts of calculus, as well as the subject’s major theorems (including the Intermediate Value Theorem, the Mean Value Theorem, The Extreme Value Theorem, Taylor’s Theorem, and the Fundamental Theorem of Calculus). In order to do this, we have to confront some serious struggles with the real number line that have been swept under the rug since grade school. Along the way we will encounter some of the most mind-bending results in all of mathematics (including fractal dimensions, the proof that some infinities are bigger than others, and the existence of functions that are continuous everywhere but differentiable nowhere). Ostensibly, this is all in the service of better understanding the derivative and the Riemann integral. In reality, this is all in the service of understanding the foundations of mathematics. We will spend an entire year on this journey through the conceptual revolution that gripped mathematics in the 1800s and left the field forever changed.