In mathematics, a partial derivative of a function of several variables is its derivative with respect to one of those variables with the others held constant (as opposed to the total derivative, in which all variables are allowed to vary). Partial derivatives are useful in vector calculus and differential geometry.

The partial derivative of a function ${\displaystyle f}$ with respect to the variable ${\displaystyle x}$ is written as ${\displaystyle f_{x},\partial _{x}f,{\frac {\partial f}{\partial x}}}$ . The partial-derivative symbol ${\displaystyle \partial }$ is a rounded letter, distinguished from the straight d of total-derivative notation. The notation was introduced by Adrien-Marie Legendre and gained general acceptance after its reintroduction by Carl Gustav Jacob Jacobi.[citation needed]

## Introduction

Suppose that ${\displaystyle f}$ is a function of more than one variable. For instance,

${\displaystyle f(x,y)=x^{2}+xy+y^{2}}$
A graph of ${\displaystyle z=x^{2}+xy+y^{2}}$ . We want to find the partial derivative at ${\displaystyle (1,1,3)}$ that leaves ${\displaystyle y}$ constant; the corresponding tangent line is parallel to the ${\displaystyle x}$-axis.

It is difficult to describe the derivative of such a function, as there are an infinite number of tangent lines to every point on this surface. Partial differentiation is the act of choosing one of these lines and finding its slope. Usually, the lines of most interest are those that are parallel to the ${\displaystyle x}$-axis, and those that are parallel to the ${\displaystyle y}$-axis.

This is a slice of the graph at the right at ${\displaystyle y=1}$

A good way to find these parallel lines is to treat the other variable as a constant. For example, to find the tangent line of the above function at ${\displaystyle (1,1,3)}$ that is parallel to the ${\displaystyle x}$-axis, we treat ${\displaystyle y}$ as a constant one. The graph and this plane are shown on the right. On the left, we see the way the function looks on the plane ${\displaystyle y=1}$ . By finding the tangent line on this graph, we discover that the slope of the tangent line of ${\displaystyle f}$ at ${\displaystyle (1,1,3)}$ that is parallel to the ${\displaystyle x}$-axis is three. We write this in notation as

${\displaystyle {\frac {\partial z}{\partial x}}(1,1,3)=3}$

or as "The partial derivative of ${\displaystyle z}$ with respect to ${\displaystyle x}$ at ${\displaystyle (1,1,3)}$ is 3."

## Definition

The function ${\displaystyle f}$ can be reinterpreted as a family of functions of one variable indexed by the other variables:

${\displaystyle f(x,y)=f_{x}(y)=x^{2}+xy+y^{2}}$

In other words, every value of ${\displaystyle x}$ defines a function, denoted ${\displaystyle f_{x}}$ , which is a function of one real number.[1] That is,

${\displaystyle f_{x}(y)=x^{2}+xy+y^{2}}$

Once a value of ${\displaystyle x=a}$ is chosen, then ${\displaystyle f(x,y)}$ determines a function ${\displaystyle f_{a}}$ which sends ${\displaystyle y}$ to ${\displaystyle a^{2}+ay+y^{2}}$ :

${\displaystyle f_{a}(y)=a^{2}+ay+y^{2}}$

In this expression, ${\displaystyle a}$ is a constant, not a variable, so ${\displaystyle f_{a}}$ is a function of only one real variable, that being ${\displaystyle y}$ . Consequently the definition of the derivative for a function of one variable applies:

${\displaystyle f_{a}'(y)=a+2y}$

The above procedure can be performed for any choice of ${\displaystyle a}$ . Assembling the derivatives together into a function gives a function which describes the variation of ${\displaystyle f}$ in the ${\displaystyle y}$ direction:

${\displaystyle {\frac {\partial f}{\partial y}}(x,y)=x+2y}$

This is the partial derivative of ${\displaystyle f}$ with respect to ${\displaystyle y}$ . Here ${\displaystyle \partial }$ is a rounded ${\displaystyle d}$ called the partial derivative symbol. To distinguish it from the letter ${\displaystyle d}$ , ${\displaystyle \partial }$ is sometimes pronounced "der", "del", "dah", or "partial" instead of "dee".

In general, the partial derivative of a function ${\displaystyle f(x_{1},\ldots ,x_{n})}$ in the direction ${\displaystyle x_{i}}$ at the point ${\displaystyle (a_{1},\ldots ,a_{n})}$ is defined to be:

${\displaystyle {\frac {\partial f}{\partial x_{i}}}(a_{1},\ldots ,a_{n})=\lim _{h\to 0}{\frac {f(a_{1},\ldots ,a_{i}+h,\ldots ,a_{n})-f(a_{1},\ldots ,a_{n})}{h}}}$

In the above difference quotient, all the variables except ${\displaystyle x_{i}}$ are held fixed. That choice of fixed values determines a function of one variable ${\displaystyle f_{a_{1},\ldots ,a_{i-1},a_{i+1},\ldots ,a_{n}}(x_{i})=f(a_{1},\ldots ,a_{i-1},x_{i},a_{i+1},\ldots ,a_{n})}$ , and by definition,

${\displaystyle {\frac {df_{a_{1},\ldots ,a_{i-1},a_{i+1},\ldots ,a_{n}}}{dx_{i}}}(a_{1},\ldots ,a_{n})={\frac {\partial f}{\partial x_{i}}}(a_{1},\ldots ,a_{n})}$

In other words, the different choices of ${\displaystyle a}$ index a family of one-variable functions just as in the example above. This expression also shows that the computation of partial derivatives reduces to the computation of one-variable derivatives.

An important example of a function of several variables is the case of a scalar-valued function ${\displaystyle f(x_{1},\ldots ,x_{n})}$ on a domain in Euclidean space ${\displaystyle \mathbb {R} ^{n}}$ (e.g. on ${\displaystyle \mathbb {R} ^{2}}$ or ${\displaystyle \mathbb {R} ^{3}}$). In this case ${\displaystyle f}$ has a partial derivative ${\displaystyle {\frac {\partial f}{\partial x_{j}}}}$ with respect to each variable ${\displaystyle x_{j}}$ . At the point ${\displaystyle a}$ , these partial derivatives define the vector

${\displaystyle \nabla f(a)=\left({\frac {\partial f}{\partial x_{1}}}(a),\ldots ,{\frac {\partial f}{\partial x_{n}}}(a)\right)}$

This vector is called the gradient of ${\displaystyle f}$ at ${\displaystyle a}$ . If ${\displaystyle f}$ is differentiable at every point in some domain, then the gradient is a vector-valued function ${\displaystyle \nabla f}$ which takes the point ${\displaystyle a}$ to the vector ${\displaystyle \nabla f(a)}$ . Consequently the gradient determines a vector field.

## Examples

The volume of a cone depends on height and radius

Consider the volume ${\displaystyle V}$ of a cone; it depends on the cone's height ${\displaystyle h}$ and its radius ${\displaystyle r}$ according to the formula

${\displaystyle V(r,h)={\frac {\pi }{3}}r^{2}h}$

The partial derivative of ${\displaystyle V}$ with respect to ${\displaystyle r}$ is

${\displaystyle {\frac {\partial V}{\partial r}}={\frac {2\pi }{3}}rh}$

It describes the rate with which a cone's volume changes if its radius is varied and its height is kept constant. The partial derivative with respect to ${\displaystyle h}$ is

${\displaystyle {\frac {\partial V}{\partial h}}={\frac {\pi }{3}}r^{2}}$

and represents the rate with which the volume changes if its height is varied and its radius is kept constant.

Now consider by contrast the total derivative of ${\displaystyle V}$ with respect to ${\displaystyle r}$ and ${\displaystyle h}$ . They are, respectively

${\displaystyle {\frac {dV}{dr}}=\overbrace {{\frac {2\pi }{3}}rh} ^{\frac {\partial V}{\partial r}}+\overbrace {{\frac {\pi }{3}}r^{2}} ^{\frac {\partial V}{\partial h}}\cdot {\frac {\partial h}{\partial r}}}$

and

${\displaystyle {\frac {dV}{dh}}=\overbrace {{\frac {\pi }{3}}r^{2}} ^{\frac {\partial V}{\partial h}}+\overbrace {{\frac {2\pi }{3}}rh} ^{\frac {\partial V}{\partial r}}\cdot {\frac {\partial r}{\partial h}}}$

We see that the difference between the total and partial derivative is the elimination of indirect dependencies between variables in the latter.

Now suppose that, for some reason, the cone's proportions have to stay the same, and the height and radius are in a fixed ratio ${\displaystyle k}$ :

${\displaystyle k={\frac {h}{r}}={\frac {\partial h}{\partial r}}}$

This gives the total derivative:

${\displaystyle {\frac {dV}{dr}}={\frac {2\pi }{3}}rh+k{\frac {\pi }{3}}r^{2}}$

Equations involving an unknown function's partial derivatives are called partial differential equations and are common in physics, engineering, and other sciences and applied disciplines.

## Notation

For the following examples, let ${\displaystyle f}$ be a function in ${\displaystyle x,y,z}$ .

First-order partial derivatives:

${\displaystyle {\frac {\partial f}{\partial x}}=f_{x}=\partial _{x}f}$

Second-order partial derivatives:

${\displaystyle {\frac {\partial ^{2}f}{\partial x^{2}}}=f_{xx}=\partial _{xx}f}$

Second-order mixed derivatives:

${\displaystyle {\frac {\partial ^{2}f}{\partial y\,\partial x}}={\frac {\partial }{\partial y}}\left({\frac {\partial f}{\partial x}}\right)=f_{xy}=\partial _{yx}f}$

Higher-order partial and mixed derivatives:

${\displaystyle {\frac {\partial ^{i+j+k}f}{\partial x^{i}\,\partial y^{j}\,\partial z^{k}}}=f^{(i,j,k)}}$

When dealing with functions of multiple variables, some of these variables may be related to each other, and it may be necessary to specify explicitly which variables are being held constant. In fields such as statistical mechanics, the partial derivative of ${\displaystyle f}$ with respect to ${\displaystyle x}$ , holding ${\displaystyle y}$ and ${\displaystyle z}$ constant, is often expressed as

${\displaystyle \left({\frac {\partial f}{\partial x}}\right)_{y,z}}$

## Formal definition and properties

Like ordinary derivatives, the partial derivative is defined as a limit. Let ${\displaystyle U}$ be an open subset of ${\displaystyle \mathbb {R} ^{n}}$ and ${\displaystyle f:U\to \mathbb {R} }$ a function. We define the partial derivative of ${\displaystyle f}$ at the point ${\displaystyle {\vec {a}}=(a_{1},\ldots ,a_{n})\in U}$ with respect to the ${\displaystyle i}$-th variable ${\displaystyle x_{i}}$ as

${\displaystyle {\frac {\partial }{\partial x_{i}}}f({\vec {a}})=\lim _{h\to 0}{\frac {f(a_{1},\ldots ,a_{i-1},a_{i}+h,a_{i+1},\ldots ,a_{n})-f(a_{1},\ldots ,a_{n})}{h}}}$

Even if all partial derivatives ${\displaystyle {\frac {\partial f}{\partial x_{i}}}(a)}$ exist at a given point ${\displaystyle a}$ , the function need not be continuous there. However, if all partial derivatives exist in a neighborhood of ${\displaystyle a}$ and are continuous there, then ${\displaystyle f}$ is totally differentiable in that neighborhood and the total derivative is continuous. In this case, we say that ${\displaystyle f}$ is a ${\displaystyle C^{1}}$ function. We can use this fact to generalize for vector valued functions (${\displaystyle f:U\to \mathbb {R} ^{m}}$) by carefully using a componentwise argument.

The partial derivative ${\displaystyle {\frac {\partial f}{\partial x}}}$ can be seen as another function defined on ${\displaystyle U}$ and can again be partially differentiated. If all mixed second order partial derivatives are continuous at a point (or on a set), we call ${\displaystyle f}$ a ${\displaystyle C^{>}2}$ function at that point (or on that set); in this case, the partial derivatives can be exchanged by Clairaut's theorem:

${\displaystyle {\frac {\partial ^{2}f}{\partial x_{i}\,\partial x_{j}}}={\frac {\partial ^{2}f}{\partial x_{j}\,\partial x_{i}}}}$