Least Square Fitting
When you try to fit a line to a number of points, you add the distances from the points to the line and minimize the sum of the squares of the distances. In mathematics the distance between a point and a line is defined as the shortest distant, i.e. the perpendicular distance. When you do numerical calculations however, there are various ways of defining the distance.
Perpendicular fitting
The segments are perpendicular to the red line. Move the line and try to get an optimal fitting. The line is optimal when the sum of the squares is minimized. Do not show the line of best fit until you have found a best fit by yourself.
Vertical fitting
The segments are vertical. Move the line and try to find an optimal fitting. Do not show the line of best fit until you have found a best fit by yourself.
The green line is made with the
Best line fit tool. Which method is used by GeoGebra, a perpendicular or vertical
fitting?
by Malin Christersson under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Sweden License

