# Linear Regression - Vector Notation

I'm a bit confused about the vector notation of the linear regression vector notation. We have this:

$$X : n\times p$$ matrix of data we have obtained;

$$\beta: p\times 1$$ matrix of coefficients

I understand the use of these in matrix notation, however when it gets to vector notation we have:

$$Y_i = x_i^T\beta + \epsilon_i$$

What is confusing me is the dimensions of the $$x_i^T$$ and the $$\beta$$. I understand what $$x_i^T$$ is (i.e. the vector of predictors for observation $$i$$), but to me the dimensions of $$x_i^T$$ are $$p \times 1$$, which would be incompatible to multiply with $$\beta$$. I know they should be (and presumably are) $$1 \times p$$, but to me the inclusion of the transpose makes them $$p \times 1$$.

If anyone could shed light on what I'm missing out on here, that'd be great.

• This just comes down to whether X is defined as a row or column vector. Jul 12, 2019 at 11:52

The matrix $$\boldsymbol{X}$$ is defined as $$\boldsymbol{X}= \begin{pmatrix} \boldsymbol{x}_1^T\\ \vdots\\ \boldsymbol{x}_n^T\\ \end{pmatrix},$$ so that, indeed, $$\boldsymbol{x}_i^T$$ is $$(1\times p)$$.