A dual formulation of an SVM can be given as
$$D(a) = \sum_{n=1}^{N} a_n - \frac{1}{2} \sum_{n=1}^{N}\sum_{m=1}^{N}a_na_mt_nt_mk(x_n, x_m)$$
I'm not sure about how to get the gradient $\nabla D(a)$.
I've already had a look at Differentiation of a double summation, from which I derived the gradient as $$\nabla_{a_p} D(a) = 1 - t_p \sum_{n=1}^N a_nt_nk(x_n, x_p)$$
Am I right? If so, it's not clear to me what $t_p$ stands for, since there's no iterator $p$ for a summation or anything.
EDIT:
My trivial problem was understanding that $\nabla_{a_p}$ is the $p$-th entry of my gradient vector. Also the matrix representation of the answer below helps a lot.