I found the following equations in my notes:
Linear Approximation by Least Squares
A first approximation is the regression line: the least squares approximation to the data. If written in the form $y = c_0 + c_1 (x - \bar{x})$, the normal equations are diagonal: $$ \begin{pmatrix} m + 1 & 0 \\ 0 & \sum_i (x_i - \bar{x})^2 \end{pmatrix} \begin{pmatrix} c_0 \\ c_1 \end{pmatrix} = \begin{pmatrix} \sum_i y_i \\ \sum_i (x_i - \bar{x}) y_i \end{pmatrix}. $$
The coefficients are: $$ c_0 = \bar{y}, \quad c_1 = \frac{\sum_{i=0}^m (x_i - \bar{x})(y_i - \bar{y})}{\sum_{i=0}^m (x_i - \bar{x})^2}. $$
I have seen the expression for $c_1$ being derived elsewhere (see Mathworld and Finding equation of best fit line in simple linear regression), but I know not where the equality $c_0 = \overline{y}$ nor the above matrix from which the equation is derived come from. In fact, it seems to me that the equation contradicts the result in formula (13) in the Mathworld article, namely
$$c_0 = \frac{\overline{y}\sum_i x_i^2-\overline{x}\sum_ix_iy_i}{\sum_ix_i^2-n\overline{x}^2}.$$