TeX source:
Q=\begin{pmatrix} \mathbf{x}_1\cdot\mathbf{x}_1 & \dots & \mathbf{x}_1\cdot\mathbf{x}_p & \mathbf{x}_1\cdot\mathbf{u} \\ \vdots & \ddots & \vdots & \vdots\\ \mathbf{x}_p\cdot\mathbf{x}_1 & \dots & \mathbf{x}_p\cdot\mathbf{x}_p & \mathbf{x}_p\cdot\mathbf{u} \\ \mathbf{u}\cdot\mathbf{x}_1 & \dots & \mathbf{u}\cdot\mathbf{x}_p & \mathbf{u}\cdot\mathbf{u} \end{pmatrix}