# Data matrix

A data matrix is a $n \times p$ matrix, where $n$ is the number of samples observed and $p$ is the number of variables measured (the same for all samples). $\mathbf{X} = \begin{bmatrix} x_{11} & x_{12} & \cdots & x_{1p} \\ x_{21} & x_{22} & \cdots & x_{2p} \\ \vdots & & & \vdots \\ x_{n1} & x_{n2} & \cdots & x_{np} \\ \end{bmatrix}$
Each sample in the data matrix can be considered a multivariate observation: $\mathbf{x}_i = \begin{bmatrix} x_{i1} \\ \vdots \\ x_{ip} \\ \end{bmatrix}$ In this case, the data matrix $\mathbf{X}$ can therefore be constructed as follows: $\mathbf{X} = \begin{bmatrix} \mathbf{x}_i^\mathrm{T} \\ \vdots \\ \mathbf{x}_i^\mathrm{T} \\ \end{bmatrix}$