---
tag: 0P30YYZN85
kind: statement
role: corollary
name: Second-order Taylor expansion
aliases: [second-order-taylor-formula]
msc: [26B12]
uses: [0J8T4K4YTE, 0SCSQWXRA4, 0NS2QYVC4Y, 0TCBZMEYGN]
sources:
  - url: https://en.wikipedia.org/wiki/Taylor%27s_theorem
    locator: Taylor's theorem for multivariate functions
  - url: https://en.wikipedia.org/wiki/Taylor%27s_theorem
    locator: Example in two dimensions
---

## Statement

Let $U \subseteq \mathbb{R}^n$ be open, let $f \colon U \to \mathbb{R}$ be of [[class C^2|0TCBZMEYGN]] on $U$, and let $a \in U$.
Let $\nabla f(a)$ be the [[gradient|0NS2QYVC4Y]] of $f$ at $a$, and let $H_f(a)$ be the [[Hessian matrix|0SCSQWXRA4]] of $f$ at $a$.
Then
$$f(a + h) = f(a) + \nabla f(a) \cdot h + \tfrac{1}{2} \, h^{\mathsf{T}} H_f(a) \, h + R(h), \qquad \lim_{h \to 0} \frac{R(h)}{\|h\|^2} = 0.$$

## Remarks

This is the case $k = 2$ of [[Taylor's theorem in several variables|0J8T4K4YTE]], written with matrices. The quadratic term collects the terms with $|\alpha| = 2$.
For $n = 2$ and $h = (u, v)$, the quadratic term is $\tfrac{1}{2} \left( f_{xx}(a) u^2 + 2 f_{xy}(a) u v + f_{yy}(a) v^2 \right)$.
At a critical point the linear term is zero, so the sign of $h^{\mathsf{T}} H_f(a) h$ controls the behaviour of $f$ near $a$. This is the basis of the [[second derivative test|0GYDV9FE98]].

## Explanations

### L1 human

A function of class $C^2$ is close to a quadratic polynomial near each point.
The gradient gives the linear part and the Hessian gives the quadratic part.
The error goes to zero faster than $\|h\|^2$.
