Solution
= Solution
Use a column <gradient>. By the multivariable <chain rule>,
$$
\boxed{\nabla l(\mathbf x)=
\sum_{i=1}^n y_i f'(\mathbf a_i^{\mathsf T}\mathbf x)\,\mathbf a_i.}
$$
The scalar coefficients multiply the constant <vectors> $\mathbf a_i$. In particular $f'(t)=-te^{-t^2/2}$, although explicit differentiation of $f$ is not required.