Define $K:\mathbb{R}^{2}\times\mathbb{R}^{2} \to \mathbb{R}$ by
$$K(a,b)=K\left((a_{1},a_{2}),(b_{1},b_{2})\right)=a^{T}b+\cos\left(\frac{(a_{2}-b_{2})\pi}{3}\right)=a_{1}b_{1}+a_{2}b_{2}+\cos\left(\frac{(a_{2}-b_{2})\pi}{3}\right).$$
Let $a_{1},a_{2},\cdots a_{n}\in\mathbb{R}^{2}$ are arbitrary vectors. And $A$ is $n\times n$ matrix with $A_{ij}=K(a_{i},a_{j}).$
I want to prove that $A$ is positive semi-definite.But I don't know how to. Any help will be thanked.
An $n\times n$ matrix whose $r,s$-th entry is $a_{r,s}=\cos(t_r-t_s)$, for some constants $t_1,\ldots,t_n$ is positive semidefinite, in the sense that if $z\in\mathbb C^n$, then $\sum_{r,s}a_{r,s}z_r\bar z_s\ge 0$. This can be seen by recognizing $\cos t$ as the characteristic function of a random variable, namely $\cos t=E[e^{itX}]$, where $X=\pm 1$ with probabilities $1/2$ and $1/2$. (Which is just a complicated way of saying $\cos t=(e^{it}+e^{-it})/2$.) One can check this by appealing to Bochner's theorem, or directly: $$\sum_{r,s}\cos(t_r-t_s)z_r\bar z_s=\sum_{r,s}E[e^{i(t_r-t_s)X}] z_r\bar z_s\\=\sum_{r,s}E[e^{it_rX}z_re^{-it_sX}\bar z_s]=E\left[ \left|\sum_r e^{it_rX}z_r\right|^2\right] \ge 0.$$
The OP's matrix is the sum of such a matrix and of a Gram matrix, and hence is psd as well.