Nothing past this point is for exam, obviously.
Chapter 53. If you are thinking of majoring in math…
During the course, one of the students asked me about academic advice saying they wanted to become a math major at MIT. If that also describes you, here’s what I told them. The course numbers here are with respect to MIT, but this advice should hold equally well at other universities.
§53.1 The two starter topics are algebra and analysis, not calculus
It may come as a surprise to you that 18.02 isn’t a prerequisite, even indirectly, for most upper-division math classes ( for ). The two most important areas to take in pure math are 18.100 (real analysis) and 18.701–18.702 (algebra); these are sort of the barrier between the world of pre-university math and serious math. Once you clear these two classes, the floodgates open and the world of modern math is yours to explore (see the dependency chart in the Napkin for more on this).
For example, if you take 18.701, the instructor will literally throw away the “definitions” of linear transformations (and others) you learned in 18.02 and replace them with the “correct” ones. You’ve seen me do this already. Similarly, you will have new rigorous definitions of derivatives and integrals. In some sense, 18.100 is really redoing all of 18.01 and 18.02 with actual proofs.
§53.2 Proof-writing
A prerequisite to both 18.100 (real analysis) and 18.701–18.702 (algebra) isn’t any particular theory, but proof experience, and that’s the biggest priority if you don’t have that yet. (And I don’t mean two-column proofs in 9th grade geometry. Two-column proofs were something made up for K-12 education and never used again.)
At MIT, I’ve been told in recent years there’s a class called 18.090 for this. This class is new enough I don’t even have any secondhand accounts, but if Poonen is on the list of instructors who developed the course, I trust him. If you’re at a different school, my suggestion would be to ask any of the math professors a question along the lines of “I’d like to major in math, but I don’t have proof experience yet. Which class in your department corresponds to learning proof arguments?”. They should know exactly what you’re talking about.
Alternatively, if you are willing to study proof-writing independently, the FAQ https://web.evanchen.cc/faq-contest.html#C-5 on my website has some suggestions. In particular, if you’re a textbook kind of person, the book I used growing up was Rotman’s Journey into Math: An Introduction to Proofs, available at https://store.doverpublications.com/products/9780486453064 it worked well for me. I’m sure there are other suitable books as well.
§53.3 The three phases of math education (from Tao’s blog)
Let me put proof-writing into the bigger framework. Terence Tao, on his blog, describes a division of mathematical education into three stages. The descriptions that follows are copied verbatim from that link:
- The “pre-rigorous” stage, in which mathematics is taught in an informal, intuitive manner, based on examples, fuzzy notions, and hand-waving. (For instance, calculus is usually first introduced in terms of slopes, areas, rates of change, and so forth.) The emphasis is more on computation than on theory.
- The “rigorous” stage, in which one is now taught that in order to do maths “properly”, one needs to work and think in a much more precise and formal manner (e.g. re-doing calculus by using epsilons and deltas all over the place). The emphasis is now primarily on theory; and one is expected to be able to comfortably manipulate abstract mathematical objects without focusing too much on what such objects actually “mean”.
- The “post-rigorous” stage, in which one has grown comfortable with all the rigorous foundations of one’s chosen field, and is now ready to revisit and refine one’s pre-rigorous intuition on the subject, but this time with the intuition solidly buttressed by rigorous theory. (For instance, in this stage one would be able to quickly and accurately perform computations in vector calculus by using analogies with scalar calculus, or informal and semi-rigorous use of infinitesimals, big-O notation, and so forth, and be able to convert all such calculations into a rigorous argument whenever required.) The emphasis is now on applications, intuition, and the “big picture”.
These notes are still in the first stage. The introduction-to-proofs class at your school will essentially be the beginning of the second stage.
I also really like the following picture from Math with Bad Drawings:

Chapter 54. Proofs of the dot product property
§54.1 Deriving the geometric definition of dot product from the algebraic one
This proof is short, but harder to come up with.
We have two definitions in play and we want to show they coincide, which makes notation awkward. So in what follows, our notation will always refer to the algebraic definition; and we will prove that .
The algebraic definition is already enough to tell us that
(18)
by the Pythagorean theorem: if then both sides equal .
Let denote the origin, and let and denote the endpoints of and when we draw them as arrows emanating from the origin. Hence is a vector pointing from to .
We now use Equation 18 three times as follows:
However, the law of cosines on triangle also tells us that
where is the angle between and . Setting the two equations for equal gives
As and , the proof is complete.
§54.2 Deriving the algebraic definition of dot product from the geometric one
The proof in Section 54.1 might seem magical. Indeed, it’s so short because it’s cheating in some way: it starts with the algebraic definition. But if you’ve never seen the dot product before, that algebraic definition is unnatural; you wouldn’t have any idea to write the expression . So in this section we give a proof that starts from the geometric formula and shows how you would come up with .
So this time our convention is flipped from Section 54.1: in what follows, our notation will always refer to the geometric definition; that is . And our goal is to show that it matches the algebraic definition.
We will assume that (i.e. is a unit vector) so that is the length of the projection of onto . This is OK to assume because in the general case one just scales everything by .
Easy special case
As a warmup, try to show that if is any vector, then . (This is easy. The projection of onto is literally .)
Main proof
For concreteness, specialize to and consider where is a unit vector (i.e. ), and is any vector in . Then we want to show that the projection of onto has length . See Figure 131.
The basic idea is to decompose . The length of projection of onto can be decomposed then into the lengths of projections of and . (To see this, tilt your head so the green line is horizontal; recall that the black quadrilateral is a rectangle, hence also a parallelogram). In other words,
But we already did the special cases before:
Hence, we get the right-hand side is
as advertised. In summary, by using the black parallelogram, we were able to split into two easy cases we already know how to do.
The same idea will work in if you use instead, and replace the parallelogram with a parallelepiped, in which case one now has easy cases. And so on in dimensions.
Chapter 55. What does mean?
When learning mathematics, I believe definitions are actually more important than theorems. A lot of confusion comes from not having been given careful definitions of the objects. (See https://web.evanchen.cc/handouts/NaturalProof/NaturalProof.pdf for more on that.)
So in general any time you are confused about whether an operation is “legal” — and this is true in all of math, not just 18.02 — the first thing to really check whether you have been given a precise definition. The endless Internet debates on whether is even or whether or whether is a continuous function (hint: yes) are all examples of people who don’t know the definitions of objects they’re discussing.
§55.1 Real exponents, real base
With that in mind, let’s fix a positive real number and think about what should mean.
Definition 55.1 (18.100 definition).
- When is an integer, then , where is repeated times.
- Then we let for each integer .
- When is a rational number, means the unique such that . (In 18.100, one proves this is unique and does exist.)
- It’s less clear what means when , like or . I think usually one takes a limit of rational numbers close to and lets . (In 18.100, one proves this limit does in fact exist.)
§55.2 Complex exponents, real base
But when , what does mean? There’s no good way to do this.
You likely don’t find an answer until 18.112, but I’ll tell you now. In 18.100 you will also prove that the Taylor series
is correct, where is Euler’s constant.
So then when you start 18.112, we will flip the definition on its head:
Definition 55.2 (18.112 definition). If , we define
Then for , we let .
To summarize: in 18.100, we defined exponents in the way you learned in grade school and then proved there was a Taylor series. But in 18.112, you start with the Taylor series and then prove that the rules in grade school you learned still applied.
And checking this consistency requires work. Because we threw away Definition 55.1, identities like are no longer “free”: they have to be proved rigorously too. (To be fair, they need to be proved in 18.100 too, but there it’s comparatively easier.) I think you shouldn’t be surprised they’re true; we know it’s true for , so it’s one heck of a good guess. But you shouldn’t take these on faith. At least get your professor to acknowledge they require a (non-obvious) proof, even if you aren’t experienced enough to follow the proof yourself yet.
Anyway, if we accept this definition, then Euler’s formula makes more sense:
Theorem 55.3 (Euler). We have
The point is that cosine and sine also have a Taylor series that is compatible with definition:
(19)
And if you put these together, you can verify Theorem 55.3, up to some technical issues with infinite sums. I think the professor even showed this in class:
§55.3 Complex exponents, complex base
But what about ? Our Definition 55.2 above only worked for positive real numbers . Here, it turns out you’re out of luck. There isn’t any way to define in a way that makes internal sense. The problem is that there’s no way to take a single log of a complex number, so the analogy with breaks down.
Put another way: there’s no good way to assign a value to , because are all equal to . You might hear this phrased “complex-valued logarithms are multivalued”. You can have some fun with this paradox:
Yeah, trouble.
§55.4 Trig functions with complex arguments
On the other hand, can be defined: use the Taylor series Equation 19, like we did for . To spell it out:
Definition 55.4 (18.112 trig definitions). If is a complex number, we define
If you do this, then Definition 55.2 implies the following identities are kosher:
Proposition 55.5. Under Definition 55.4, we have the identities
Proof. If you write out and and add them, the odd ’s cancel and the even ’s don’t, which gives you
So dividing by , we see on the right-hand side, as needed. The argument with is similar, but this time the even ’s cancel and you divide by instead.
So for example, from Proposition 55.5, we conclude for example that
Strange but true.
§55.5 The future: what are 18.100 and 18.112 anyway?
First I need to tell you what analysis is. When students in USA ask me what analysis is, I sometimes say “calculus but you actually prove things”. But that’s actually a bit backwards; it turns out that in many parts of the world, there is no topic called “calculus”.29 It would be more accurate to say calculus is analysis with proofs, theorems, and coherent theorem statements deleted, and it only exists in some parts of the world (which is why mathematicians will tend to look down on it).
With that out of the way,
- 18.100 is real analysis, i.e. analysis of functions over
- 18.112 is complex analysis, i.e. analysis of functions over .
If you ever take either class, I think the thing to know about them is:
Complex analysis is the good twin and real analysis is the evil one: beautiful formulas and elegant theorems seem to blossom spontaneously in the complex domain, while toil and pathology rule the reals.
— Charles Pugh, in Real Mathematical Analysis
Chapter 56. Saddle point simulation code for Section 17.3
import random
random.seed("18.02 Fall 2024")
def classify_critical_points(a3, a2, a1, b3, b2, b1):
# f = a3 * x**3 + a2 * x**2 + a1 * x + b3 * y**3 + b2 * y**2 + b1 * y
# the constant term has no effect on the critical points, so we ignore it
assert a3 != 0 and b3 != 0
# fx = 3 a3 x^2 + 2 a2 x + 1; fy = 3 b3 y^2 + 2 b2 y + 1
# If either of these have negative discriminant, rage-quit
if 4 * a2 * a2 - 12 * a3 * a1 < 0 or 4 * b2 * b2 - 12 * b3 * b1 < 0:
return (0, 0, 0)
# Otherwise, let's get the two critical values
x1 = (-2 * a2 + (4 * a2 * a2 - 12 * a3 * a1) ** 0.5) / (6 * a3)
x2 = (-2 * a2 - (4 * a2 * a2 - 12 * a3 * a1) ** 0.5) / (6 * a3)
y1 = (-2 * b2 + (4 * b2 * b2 - 12 * b3 * b1) ** 0.5) / (6 * b3)
y2 = (-2 * b2 - (4 * b2 * b2 - 12 * b3 * b1) ** 0.5) / (6 * b3)
local_minima, local_maxima, saddle_points = 0, 0, 0
for x0 in (x1, x2):
for y0 in (y1, y2):
fxx = 6 * a3 * x0 + 2 * a2
fyy = 6 * b3 * x0 + 2 * b2
assert fxx != 0 and fyy != 0 # give up lol
if fxx > 0 and fyy > 0:
local_minima += 1
elif fxx < 0 and fyy < 0:
local_maxima += 1
else:
saddle_points += 1
return (local_minima, local_maxima, saddle_points)
local_minima = 0
local_maxima = 0
saddle_points = 0
N = 10**6
for _ in range(10000):
a1 = random.randint(-N, N + 1)
a2 = random.randint(-N, N + 1)
a3 = random.randint(-N, N + 1)
b1 = random.randint(-N, N + 1)
b2 = random.randint(-N, N + 1)
b3 = random.randint(-N, N + 1)
u, v, w = classify_critical_points(a3, a2, a1, b3, b2, b1)
local_minima += u
local_maxima += v
saddle_points += w
total = local_minima + local_maxima + saddle_points
print(local_minima / total, local_maxima / total, saddle_points / total, total)