# Automatic Differentiation

Automatic Differentiation (AD) is a method to evaluate derivatives of a function, $f:\mathbb{R}^M\rightarrow\mathbb{R}^N$, defined by a computer program. By viewing the computation as a composition of elementary functions and applying the chain rule, the derivatives are exact up to machine precision and the method has the same computational time complexity as the original program.