Theorem: Characterization of Differentiability

{{refactor|one-dimensional case deserves its own page, perhaps|level = medium}}
Let $\mathbb X$ be an open rectangle of $\R^n$. 
Let $f: \mathbb X \to \R, \mathbf x \mapsto \map f {\mathbf x}$ be a real-valued function.
Let $\mathbf x = \begin {bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end {bmatrix} \in \R^n$.
Let $\map {\Delta f} {\mathbf x} = \map f {\mathbf x + \Delta \mathbf x} - \map f {\mathbf x}$ .
Let $\dfrac {\partial f} {\partial x_j}$ be the partial derivative of $f$ {{WRT|Differentiation}} $x_j$.
Then $f$ is differentiable {{iff}} there exists some $\map {\Delta f} {\mathbf x}$ such that:
:$\ds \map {\Delta  f} {\mathbf x} = \sum_{i \mathop = 1}^n \frac {\partial \map f {\mathbf x} } {\partial x_i} \Delta x_i + \sum_{i \mathop = 1}^n \varepsilon_i \Delta x_i$
where $\forall i: 1 \le i \le n: \varepsilon_i \to 0$ as $\Delta x_i \to 0$.

Proof:
Suppose $f: \R^1 \to \R$.
Define:
:$\map f x = y$
:$\Delta y = \map f {x + \Delta x} - \Delta x$
From the definition of the derivative of a real function, we can say that $f$ is differentiable {{iff}}:
:$\dfrac {\Delta y} {\Delta x} \to \dfrac {\d y} {\d x}$
as $\Delta x \to 0$.
Clearly, this is equivalent to saying that $f$ is differentiable {{iff}}:
:$\dfrac {\Delta y} {\Delta x} - \dfrac {\d y} {\d x} = \varepsilon$
as $\varepsilon \to 0$, where $\varepsilon \in \R$ is some real number.
Solving this equation for $\Delta y$:
:$\Delta y = \dfrac {\d y} {\d x} \Delta x + \varepsilon \Delta x$
That is, {{iff}} the real function is differentiable $\varepsilon \to 0$ as $\Delta x \to 0$.
{{qed|lemma}}
Now consider $f: \R^n \to \R$, $n > 1$.
From the definition of differentiability of a real-valued function, $f$ is differentiable {{iff}}:
:$\map {\Delta f} {\mathbf x} = \map {\nabla f} {\mathbf x} \cdot \Delta \mathbf x + \begin{bmatrix} \\ \varepsilon_1 \\ \varepsilon_2 \\ \vdots \\ \varepsilon_n \end {bmatrix} \cdot \Delta \mathbf x$
such that $\begin{bmatrix} \\ \varepsilon_1 \\ \varepsilon_2 \\ \vdots \\ \varepsilon_n \end{bmatrix} \to \mathbf 0$ as $\Delta \mathbf x \to \mathbf 0$.
{{wtd|needs to change to accommodate the new (more general) definition of differentiability}} 
Observe that:
{{begin-eqn}}
{{eqn | l = \map {\nabla f} {\mathbf x} \cdot \Delta \mathbf x + \begin {bmatrix} \\ \varepsilon_1 \\ \varepsilon_2 \\ \vdots \\ \varepsilon_n \end {bmatrix} \cdot \Delta \mathbf x
      | r = \begin {bmatrix} \frac {\map {\partial f} {\mathbf x} } {\partial x_1} \\ \frac {\map {\partial f} {\mathbf x} } {\partial x_2} \\ \vdots \\ \frac {\map {\partial f} {\mathbf x} } {\partial x_n} \end {bmatrix} \cdot \begin {bmatrix} \Delta x_1 \\ \Delta x_2 \\ \vdots \\ \Delta x_n \end {bmatrix} + \begin {bmatrix} \\ \varepsilon_1 \\ \varepsilon_2 \\ \vdots \\ \varepsilon_n \end {bmatrix} \cdot \begin {bmatrix} \Delta x_1 \\ \Delta x_2 \\ \vdots \\ \Delta x_n \end {bmatrix}
}}
{{eqn | r = \sum_{i \mathop = 1}^n \frac {\map {\partial f} {\mathbf x} } {\partial x_i} \Delta x_i + \sum_{i \mathop = 1}^n \varepsilon_i \Delta x_i
      | c = {{Defof|Dot Product}}
}}
{{end-eqn}}
where $\begin {bmatrix} \\ \varepsilon_1 \\ \varepsilon_2 \\ \vdots \\ \varepsilon_n \end {bmatrix} \to \begin {bmatrix} \\ 0 \\ 0 \\ \vdots \\ 0 \end {bmatrix}$ as $\begin {bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end {bmatrix} \to  \begin {bmatrix} 0 \\ 0 \\ \vdots \\ 0 \end{bmatrix}$.
{{qed}}