4
$\begingroup$

Why is it that when calculating the sum of squared residuals in matrix form we use $e'e$ (where $e'$ is the transpose of $e$) instead of $e^2$?

$\endgroup$
7
$\begingroup$

In matrix notation, the residuals are typically written as an $n$ length column vector $\mathbf{e}$ where $n$ is the number of observations.

$$ \mathbf{e} = \left[ \begin{array}{c} e_1 \\ e_2 \\ \ldots \\ e_n \end{array} \right]$$

Then:

$$ \mathbf{e}'\mathbf{e} = \left[ \begin{array}{cccc} e_1 & e_2 & \ldots & e_n \end{array} \right] \left[ \begin{array}{c} e_1 \\ e_2 \\ \ldots \\ e_n \end{array} \right] = \sum_i e_i^2$$

In contrast, $\mathbf{e}\mathbf{e}$ is rather sloppy (arguably downright wrong) since you can't multiply an $n$ by 1 matrix by another $n$ by 1 matrix.

Notation note: I personally like the engineering convention that bold lowercase letters denote vectors and normal lowercase letters denote scalars; this notation reduces confusion about what's a vector and what's a scalar.

$\endgroup$
2
$\begingroup$

I understand now. It is because you want to find a scalar answer for the sum of squared residuals.

$\endgroup$
  • $\begingroup$ so, would you like to remove the question? $\endgroup$ – Haitao Du Aug 9 '16 at 14:13
  • 5
    $\begingroup$ @hxd1011 It's perfectly acceptable for a user to ask and answer their own question. The question can remain as it is. $\endgroup$ – Sycorax says Reinstate Monica Aug 9 '16 at 14:56
  • 5
    $\begingroup$ Welcome to Cross Validated! You might want to expand your answer a little for those who are still confused. $\endgroup$ – Scortchi - Reinstate Monica Aug 9 '16 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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