How dual numbers allow computers to calculate derivatives automatically and efficiently
In short: This lecture explains forward-mode automatic differentiation, a technique for computing derivatives in software. By introducing dual numbers—a special numerical type that tracks both a value and its derivative simultaneously—you can implement a functional differentiation system using only a few lines of Julia code.
Automatic differentiation (AD) is a method for evaluating the derivative of a function defined by a computer program. Unlike symbolic or numerical differentiation, forward-mode AD leverages the properties of dual numbers to propagate derivative information alongside the primary calculation.
Presented by Alan Edelman and Steven G. Johnson as part of the 2023 MIT course 'Matrix Calculus For Machine Learning And Beyond,' this session demonstrates that building an AD system is surprisingly concise. By redefining how numbers behave within a program, one can automate calculus tasks essential to modern machine learning workflows.
Opens the Intellect+ feed with this card first. Swipe up for the next one.
Sources
- Summary by Intellect · source: Lecture 5 Part 2: Forward Automatic Differentiation via Dual Numbers
- Also: Lecture 5 Part 2: Forward Automatic Differentiation via Dual Numbers | Matrix Calculus for Machine Learning and Beyond | Mathematics | MIT OpenCourseWare
To cite this card, link to https://intellectplus.co.uk/app/ideas-lecture-5-part-2-forward-automatic-differentiation-via-dual-.
How we source, check and correct cards: Editorial standards.
General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.
Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?
Related
More in Mathematics · More in Ideas & Philosophy · Latest · A–Z · All topics