# Generalizing the total differential to multidimensional codomains

Consider a function $f: \mathbb{R}^n \to \mathbb{R}$ in the variables $x_1, \, x_2, \, \dots, \, x_n$. In multivariable calculus, we learn that the total differential of $f$ is defined as

$$df = \frac{\partial f}{\partial x_1} \, dx_1 + \frac{\partial f}{\partial x_2} \, dx_2 + \cdots + \frac{\partial f}{\partial x_n} \, dx_n.$$

I'm trying to generalize this to the case where the codomain $f$ is multidimensional. More specifically, consider $f: \mathbb{R}^n \to \mathbb{R}^m$ where $m$ is not necessarily one. Is there a way to define the total differential of $f$, in this case?

• Sure: if $f$ is written $(f_1, \ldots, f_n)$, then you could define the total differential as $(df_1, \ldots, df_n)$. It doesn't really make sense for the total differential to be an $\mathbb{R}$-valued function, since the "total change" in the function value when you change the value of the variables slightly is not a scalar. If you want, you could take the length of this vector (i.e. $\sqrt{\sum (f_i)^2}$), but this isn't really that useful. Aug 4, 2014 at 9:55

Yes. Given $f: \Bbb R^n \to \Bbb R^m$, and a point $p \in \Bbb R^n$, we say $f$ is differentiable at $p$ if exists a linear transformation, denoted $\mathrm{d}f_p : \Bbb R^n \to \Bbb R^m$ such that: $$\lim_{h \to 0} \frac{f(p+h) - f(p) - \mathrm{d}f_p(h)}{\|h\|} = 0$$ It is easy to show that this total derivative is unique. To each linear map in finite dimensions corresponds a matrix. Writing $$f(p) = (f_1(p), \ldots, f_m(p))$$ we have that the matrix of $\mathrm{d}f_p$ in the standard basis for $\Bbb R^n$ and $\Bbb R^m$, called the Jacobian of the funcion, is the matrix: $$Jf_p = \begin{pmatrix}\frac{\partial f_1}{\partial x_1}(p) & \cdots & \frac{\partial f_1}{\partial x_n}(p) \\ \vdots & \ddots & \vdots \\ \frac{\partial f_m}{\partial x_1}(p) & \cdots & \frac{\partial f_m}{\partial x_n}(p) \end{pmatrix}$$ Or in shorter terms, $Jf_p = \left(\frac{\partial f_i}{\partial x_j}(p)\right)_{m \times n}$.