Prove the closed-form solution for ordinary least squares (OLS) regression and state the underlying assumptions.