# Ordinary Least Squares Regression: If slope is definitively 0, do we expect intercept to equal the sample mean?

As the title says, for a regression model, is there a proof that shows that estimating a model where slope is 0 will give the sample mean? It makes intuitive sense but I can't seem to find a source for this. Please let me know if I need more information! Thank you in advance :)