This element shows what linear regression tries to achieve: it seeks the linear function (i.e., a straight line) that minimizes the average distance or residual (red and blue lines) between the prediction (dark grey line) and a collection of points (black scatter points).
Tick the checkbox to see how the optimal solution. Observe that this solution minimizes the distance, and balances the residuals above and below the prediction.