In a normal linear model (with intercept), show that if the residuals satisfy $e_i = a + \beta x_i$, for $i = 1\dots n$, where $x$ is a predictor in the model, then each residual is equal to zero.
I'm not really sure how to do this, I tried writing out $e_i = y_i - \hat{y}_i$; but I wasn't able to get anywhere.
Since your regression model has intercept, we can assume, the X matrix for the regression has the form $$ X = \begin{pmatrix} 1 & x_1^T \\ 1 & x_2^T \\ \vdots & \vdots \\ 1 & x_n^T \\ \end{pmatrix} $$
Note that the residual must be orthogonal to every vector in column space of $X$. This is because the predicted value, $\hat{Y} = P_X Y$ (where $P_X$ is the orthogonal projection matrix onto the column space of $X$), and hence the residual vector $e = Y - \hat{Y} = (I - P_X)Y $. So for any vector $c$ of appropriate dimension $$c^T e = (c^T - c^TP_X)Y.$$ Now if $c$ lies in the column space of $X$ then $$P_X c =c$$ or $$c^T = c^T P_X^T = c^T P_X \text{ since $P_X$ is symmetric}$$ and it follows for any $c$ in the column space of $X$ $$c^T e = 0.$$
Now, your condition implies $e$ itself lies in the column space of $X$ and hence must be orthogonal to itself, i.e., $e^Te = \|e\|^2 = 0$, i.e., $e = 0.$