This is not clearly stated. I assume you're using the simple linear regression model .

Multiplying by n, what you want to show is that .

Or, the sum of the residuals, .

The residuals sum to zero in the model .

But they don't sum to zero if you drop the term in your model, because the vector of all ones

is no longer in the column space of the design matrix.

Here's a simple proof in this case....

Just substitute into the model...

.

Now take the sum of this and note that

leads you to your conclusion.