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.

  • 2
    $\begingroup$ This just comes down to whether X is defined as a row or column vector. $\endgroup$
    – Peter Flom
    Commented Jul 12, 2019 at 11:52

1 Answer 1


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)$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.