2

Let $f(x) = e^{a^Tx}$ where $a,x \in \mathbb{R}^N$

Is $\frac {\partial f}{\partial x} = e^{a^Tx}a$ ?

Rein
  • 1,174
  • what is $T$??${{}}$ – Monkey D. Luffy Jul 17 '13 at 16:13
  • I'm assuming $a^T$ is a real number and that $f$ is a real function of real variable.

    Your notation $\dfrac{\partial f(x)}{\partial x}$ is incorrect. It should be either $\dfrac{\partial f}{dx}(x)$ or $\dfrac{\partial f}{dx}$, depending on what you'd write on the other side of the equality.

    – Git Gud Jul 17 '13 at 16:14
  • @MonkeyD.Luffy Sorry $T$ is transpose notation. $a$ and $x$ are vectors. – Rein Jul 17 '13 at 16:19
  • @GitGud May I know what are the differences? – Rein Jul 17 '13 at 16:20
  • @Rein You should add that info to the question. – Git Gud Jul 17 '13 at 16:24
  • @Rein $\dfrac{\partial f}{\partial x}(x)$ denotes the derivative of $f$ evaluated at $x$, while $\dfrac{\partial f}{\partial x}$ is simply a notation for the derivative of $f$ (which is a function on its own right). – Git Gud Jul 17 '13 at 16:26
  • @GitGud Updated. Thanks for your correction :) – Rein Jul 17 '13 at 16:32
  • @Rein Notice I said 'depending on whatyou'd write on the other side of the equality'? The way you wrote it should be $\dfrac{\partial f}{\partial x}(x)$ because the RHS is an expression depending on $x$. – Git Gud Jul 17 '13 at 16:37
  • Perhaps by $\dfrac{\partial f}{\partial x}$ you mean the gradient? – Mikhail Katz Jul 17 '13 at 16:40

2 Answers2

3

Consider the derivative with respect to $x_i$: $$ \frac{\partial f}{\partial x_i} = \exp\left(\sum_{j \neq i}a_jx_j\right)a_i \exp\left(a_i x_i\right) = a_i\exp\left(\sum_{j}a_jx_j\right) = a_i e^{a^Tx} $$

Since the derivative is most often denoted as the transpose of the gradient, we have $$ Df = a^T e^{a^Tx} \\ \nabla f = ae^{a^Tx} . $$

Ross B.
  • 1,856
  • 10
  • 16
0

If $a \in R^N$, $x \in R^N$, we can write $x = (x_1, x_2, . . . , x_N)$, $a = (a_1, a_2, . . . , a_N)$ in the standard coordinate system. Denoting the transpose of $a$ by $a^T$, we then have

$a^Tx = \sum_{i = 1}^{i = N}a_ix_i$,

so that

$f(x) = \exp(\sum_{i=1}^{i = N}a_ix_i)$.

Then for any $x_j$,

$\frac{\partial f}{\partial x_j} = \exp(\sum_{i =1}^{i = N}a_ix_i)a_j$.

Thus

$\nabla f = \exp(\sum_{i = 1}^{i = N}a_ix_i)(a_1, a_2, . . . , a_N) = \exp(\sum_{i = 1}^{i = N}a_ix_i)a$.

This gives the most general derivative of $f(x)$ in the classic sense; I have occasionally seen the notation $\frac{\partial f}{\partial x}$ used to denote $\nabla f$.

An alternative to the above view may be had by considering $Df(x)$ to be the linear map such that

$f(x + h) = f(x) + Df(x)h + e(h)$,

for $h \in R^N$, where $e(h)$ is an error term with the property that $\frac{||e(h)||}{||h||} \to 0$ as $||h|| \to 0$. Then since

$f(x + h) = \exp(\sum_{i = 1}^{i = N}a_i(x_i + h_i)) = \exp(\sum_{i = 1}^{i = N}a_ix_i)\exp(\sum_{i = 1}^{i = N}a_ih_i)$,

and $\exp(\sum_{i = 1}^{i = N}a_ih_i)$ may be expanded in the usual power series

$\exp(\sum_{i = 1}^{i = N}a_ih_i) = 1 + \sum_{i = 1}^{i = N}a_ih_i + \frac{1}{2!}(\sum_{i = 1}^{i = N}a_ih_i)^2 + . . . $,

it is easily seen that

$f(x + h) = \exp(\sum_{i=1}^{i = N}a_ix_i) + \exp(\sum_{i=1}^{i = N}a_ix_i)\sum_{i = 1}^{i = N}a_ih_i + e(h)$ $= f(x) + \exp(\sum_{i=1}^{i = N}a_ix_i)\sum_{i = 1}^{i = N}a_ih_i + e(h)$

showing that

$Df(x)h = \exp(\sum_{i=1}^{i = N}a_ix_i)\sum_{i = 1}^{i = N}a_ih_i = \exp(\sum_{i=1}^{i = N}a_ix_i)a^Th = f(x)a^Th$,

whence

$Df(x) = \exp(\sum_{i=1}^{i = N}a_ix_i)a^T = f(x)a^T$.

I have also occasionally seen $\frac{\partial f}{\partial x}$ used in this context as well.

The difference between $\nabla f$ and $Df$ is, of course, that the former is technically a vector field while the latter is a one-form field (that is, a field of linear functionals on the tangent spaces $T_xR^N$). But in Euclidean space, where forms and vectors are easily identified, the distinction twixt $\nabla f$ and $Df(x)$ is often overlooked.

Robert Lewis
  • 71,180
  • Downvoted, and at this late date, and with no explanation! The downvote gremlins are out to get me! – Robert Lewis Mar 20 '14 at 04:02
  • Would that these mystery downvoters possessed the huevos to *name themselves* and put forth (hopefully) *mathematical reasons* for their choices. May they "die many times before their deaths!" I'll die but once, thank you. – Robert Lewis Mar 20 '14 at 04:03