The Chain Rule of Calculus for Univariate and Multivariate Functions