Automatic Differentiation Part 1: Understanding the Math