The simple linear regression algorithm is a closed-form solution to a least-squared distance minimization problem. Here is demonstrated the one-dimensional case of simple linear regression.
Click and drag the black points to affect the regression. Double click to add or remove points. The blue point in the center represents the geometric average, through which the fit always passes through.
In this problem, the least-squared distance considered includes only the vertical component. This is what makes the problem “one-dimensional”, even though the visualization of the problem is two-dimensional.