You're training a supervised learning model and want to understand how its parameters are learned from data.
Explain the mathematical formulation of linear regression and how gradient descent optimizes its parameters.