Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
Glossary › Chain rule

What is chain rule?

The rule for differentiating a function of a function: multiply the derivatives of the links, dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}dxdy​=dudy​⋅dxdu​.

Where it is taught

The chain rule. A handful of rules cover every function a network uses. The most important one handles functions inside functions.

What the lesson leaves you with

  • Power rule: the derivative of xnx^nxn is nxn−1n x^{n-1}nxn−1. Sums are handled term by term.
  • Chain rule: for a function inside a function, multiply the derivatives of the links.
  • A network is one long chain, so the chain rule is what makes training possible.
Open the lesson

Questions

What is chain rule?
The rule for differentiating a function of a function: multiply the derivatives of the links, frac{dy}{dx} = frac{dy}{du} cdot frac{du}{dx}.
Where is chain rule used in AI?
A handful of rules cover every function a network uses. The most important one handles functions inside functions.
What is the key idea to remember about chain rule?
Power rule: the derivative of <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>x</mi><mi>n</mi></msup></mrow><annotation encoding="application/x-tex">x^n</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="katex-base"><span class="katex-strut" style="height:0.6644em;"></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.6644em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="katex-sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">n</span></span></span></span></span></span></span></span></span></span></span> is <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><msup><mi>x</mi><mrow><mi>n</mi><mo>−</mo><mn>1</mn></mrow></msup></mrow><annotation encoding="application/x-tex">n x^{n-1}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="katex-base"><span class="katex-strut" style="height:0.8141em;"></span><span class="mord mathnormal">n</span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="katex-sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">n</span><span class="mbin mtight">−</span><span class="mord mtight">1</span></span></span></span></span></span></span></span></span></span></span></span>. Sums are handled term by term.
Where can I learn chain rule step by step?
In the lesson “The chain rule” in Gradient’s course on the maths behind AI, with interactive diagrams and questions.

Related terms

  • Backpropagation
  • Derivative
  • Gradient
  • Saddle point