Some notation for scalar derivatives:

- For a function
$f\in\mathbb R\to \mathbb R$ , we write$f'\in\mathbb R\to R$ for its derivative with respect to its argument. If the argument is called$x$ , we can also write$\frac{d}{dx} f$ . If the argument represents time, we sometimes write$\dot f$ . - If a function depends on more than one variable, we write
$\frac{\partial}{\partial x} f$ or$\frac{\partial}{\partial y} f$ to indicate a*partial*derivative: the derivative with respect to one variable while holding the others constant. - Second and higher derivatives are
$f''$ ,$\ddot f$ ,$\frac{d^2}{dx^2} f$ , or$\frac{\partial^2}{\partial x\partial y} f$ . - For a function
$f$ , we write$f\big |_{\hat x}$ or$f(x)\big |_{x=\hat x}$ to represent evaluation at$\hat x$ . This means the same thing as$f(\hat x)$ but is sometimes clearer: it lets us keep one name ($x$ ) for the variable we are differentiating, and another name ($\hat x$ ) for the value we are substituting at the end.

Some of the most common identities for working with scalar derivatives:

- Differentiation and partial differentiation are linear operators: for example,
$(af+bg)' = af' + bg'$ . - Chain rule: if we want
$\frac{d}{dx}f(g(x))$ , then we use (As a mnemonic, we can "cancel the$\frac{df}{dx} = \frac{df}{dg} \frac{dg}{dx}$ $dg$ " — but since$\frac{df}{dg}$ isn't really division, this is just a mnemonic.) Another way to write the same thing:$\frac{d}{dx}f(g(x)) = f'(g(x))\, g'(x)$ - Product rule:
$(fg)' = f'g + fg'$

Here are some useful derivatives of scalar functions. In each expression,

- The derivative of a constant is zero:
$\frac{d}{dx} a=0$ . - The derivative of a monomial
$x^k$ is$kx^{k-1}$ . This works even for negative and fractional values of$k$ . One special case is$x^0$ , where by convention we treat$0x^{-1}$ as equal to zero everywhere. - The derivative of
$\sin x$ is$\cos x$ ; the derivative of$\cos x$ is$-\sin x$ . - The derivative of
$e^{ax}$ is$ae^{ax}$ . If we're using some other base$b$ , we rewrite$b^x=e^{x\ln b}$ and then use the identity above. - The derivative of
$\ln x$ is$x^{-1}$ . Again we can easily switch to another base:$\log_b x = \ln x / \ln b$ .

It's also useful to think about functions that return vectors or take vectors as arguments. If

Its derivative is then also a vector-valued function, of the same shape as

We can think of

Here's an example of a function in

Note that this plot doesn't show the argument

If the function

Then

We can think of

Here's an example of a function in

The derivative is the vector in

With the above notation, the chain rule for vector functions looks just like it did for scalar functions. Suppose

This looks just like the scalar chain rule (we "cancel the

If we write out the dot product, we get

which may be familiar as the rule for calculating the *total derivative* of