This Demonstration shows linear regression in action. You can use it to tune a straight line to fit the data and then see the result in the cost function landscape. The optimal solution is also shown.
The hypothesis in linear regression is a fit of the data in the form
with the associated (least-squares) cost function
The problem is to find such that is minimized.