Actually the squaring was for a more practical reason. Lets try to minimize the sum of the distance, oops |y-ax| is not differentiable so we can&#x27;t use calculus, lets square it instead.<p>We later realized this worked so well because it&#x27;s max likelihood of the model y=ax+b+e where e is a gaussian error function. But that came much later.