Suppose we have $n$ data points in $\mathbb{R}^p$ and we would like to calculate all pairwise dot (inner) products between them.
How can I write a single matrix multiplication that does this?
(Some vectors and matrices will need to be defined carefully)