Let $g$ denote a function of class $C^1$ from $\mathbb{R}^n$ to $\mathbb{R}$. We fix an element $a = (a_1, a_2, \ldots, a_n)$ of $\mathbb{R}^n$. Let $\varphi$ be the function from $\mathbb{R}$ to $\mathbb{R}$ defined by
$$\varphi(t) = g(ta) = g(ta_1, ta_2, \ldots, ta_n)$$
Deduce that in a neighbourhood of 0
$$g(ta) = g(0) + t\left(a_1 \mathrm{D}_1 g(0) + a_2 \mathrm{D}_2 g(0) + \cdots + a_n \mathrm{D}_n g(0)\right) + \mathrm{o}(t)$$