Let $K(x,y) = \frac{x^Ty}{||x||y||}$
$K(x,y) = \frac{||x||||y||cos(\theta)}{||x||||y||} = cos(\theta)$
If we form a gram matrix $\textbf{K}$ where each $i,j$ entry is $k(a_i,b_j)$, where $a_i,b_j$ are the $i,jth$ vectors.
$\textbf{K}$ is symmetric. But how do you show that it is positive semidefinite?
In other words, how do you show how cosine kernel is, in fact, a kernel?
Note that an $n\times n$ gram $\textbf{K}$ matrix whose $(i,j)$'th entry is given by $\langle u_i,u_j\rangle$ can be written as $A^tA$ where $A$ is an $n\times $n matrix whose $k$'th column is the vector $u_k$, and $k=1,2,\dots n$. It follows that for every $x\in\mathbb{R}^n$:
$$\langle\textbf{K}x,x\rangle=\langle A^tAx,x\rangle=||Ax||^2\geq 0$$
whence $\textbf{K}$ is positive semi-definite.
In your case take $u_i=a_i/||a_i||$.