Graphical demonstration of Least Squares (link).
An alternate method to Least Squares is Maximum Likelihood.