But leaving this aside, what we're doing is we are adding over all data points the difference between our function and the y value of the data point with the square and that distance is the distance we're minimizing. 