Algebraic Definition of Residuals from a Regression

#1
I just need a hint on how to get started on this. Any advice?

Define the residual from a regression (one independent variable) algebraically and show that:
a. the mean of the residuals is zero, and
b. the correlation of the residuals and the independent variable is zero.

Many thanks!