1.2.7 · D1Calculus & Optimization Basics

Foundations — Taylor series approximation

1,713 words8 min readBack to topic

This page assumes nothing. Before you can read the parent note Taylor series approximation, you must own every symbol it throws at you. We build each one from a picture, in an order where each tool leans on the previous.


1. The function and the point

The letter is just a name for the machine; (read " of ") means "the output when the input is ". The parenthesis is not multiplication — it's "feed this in".

Figure — Taylor series approximation

Notice the quantity in that figure — the pale-yellow gap. It answers the question "how far did I walk away from the flag?" Taylor is written entirely in powers of this gap, because when you stand at the flag () the gap is , and raised to any positive power vanishes. That vanishing is the trick that lets us peel off one coefficient at a time.


2. Slope — the derivative

Before curvature or series, you need slope: how steep is the curve, and which way does it tilt?

A curve doesn't have one slope — it bends. So we ask for the slope exactly at the flag, by drawing the line that just kisses the curve there.

Figure — Taylor series approximation

The little tick mark in means "differentiate once". Two ticks means "do it twice", and so on. When ticks get clumsy we write for "the -th derivative".


3. Curvature — the second derivative

Slope tells direction. But two curves can share a slope and still peel apart — one bends up, one bends down. We need bend.

Figure — Taylor series approximation

4. Powers and the factorial

Where does this factorial come from? Watch what differentiating a pure power does:

Each time you differentiate, the exponent falls out front as a multiplier. Do it times to and you collect , and the power drops all the way to .

Figure — Taylor series approximation

5. The summation sign

The parent writes the whole series as one compact symbol. Decode it.

Putting on top means "keep going forever" — that's a series (an infinite sum). Stopping at a finite gives a polynomial (a finite sum of powers), which is what a computer can actually evaluate.


6. The gradient and Hessian (many inputs)

ML losses depend on many numbers at once (all the weights). The single-input tools upgrade:

The symbol (a small "T") means we lay that arrow flat as a row so it can multiply the step vector — this row-times-column is a dot product, which just totals up "slope in each direction distance moved in that direction". See Derivatives and gradients.


Prerequisite map

Function f and point a

Gap x minus a

Powers of the gap

Slope idea

Derivative f prime at a

Second derivative curvature

Gradient for many inputs

Hessian for many inputs

Factorial n!

Summation sigma

Taylor polynomial Pk

Optimizer forms


Equipment checklist

Test yourself — reveal only after you have answered aloud.

What does mean, and is the parenthesis multiplication?
"Output of machine when fed "; the parenthesis is feed-in, not multiplication.
What does the gap measure, and what is it at the flag?
How far is from the base point ; it equals when .
In one sentence, what is geometrically?
The slope of the tangent line that kisses the curve at .
What does tell you that cannot?
The bend/curvature — whether the curve smiles (up) or frowns (down) at .
What does mean, and what is ?
Differentiate times; itself.
Compute and state where the factorial comes from.
; it's the number differentiating exactly times spits out.
Expand .
.
Why divide each coefficient by ?
Differentiating the -th term times inflates it by ; dividing cancels that so derivatives match.
What replaces and when has many inputs?
The gradient (slopes) and the Hessian (curvatures).
What does compute?
A dot product: total change = sum of (slope in each direction step in that direction).