Find the determinant of the following matrix: $$\begin{pmatrix}\cos\left(a_{1}-b_{1}\right) & \cos\left(a_{1}-b_{2}\right) & \cos\left(a_{1}-b_{3}\right)\\ \cos\left(a_{2}-b_{1}\right) & \cos\left(a_{2}-b_{2}\right) & \cos\left(a_{2}-b_{3}\right)\\ \cos\left(a_{3}-b_{1}\right) & \cos\left(a_{3}-b_{2}\right) & \cos\left(a_{3}-b_{3}\right) \end{pmatrix}$$For $a_1,\dots ,a_3,b_1,\dots, b_3\in\mathbb{R}$
I'm completely stumped honestly. I tried using the cosine addition identity to open the cosine, but I wasn't able to find how it helps me, and even for a $2\times2$ version of the matrix I wasn't really sure what to do. Any help?
The matrix is the product \begin{eqnarray} \begin{pmatrix}\cos a_1& \sin a_1& 0\\ \cos a_2&\sin a_2& 0\\ \cos a_3&\sin a_3 &0\end{pmatrix}\begin{pmatrix}\cos b_1& \cos b_2&\cos b_3\\ \sin b_1&\sin b_2&\sin b_3\\ 0&0&0\end{pmatrix} \end{eqnarray} and thus the determinant is 0.