The purpose of least squares is to approach the approximate solution of overestimated equations, or equations that have more unknown variables than known. In other words, its main purpose is to isolate unknown variables and minimize their effect on the known variables. The purpose of linear regression is to show the scalable relationship between two or more variables. In linear regression, all variables are clearly known. The variables analyzed by linear regression directly affect one another in a clearly scalable manner.
The procedure of least squares adjusts the parameters of the unknown variables in order to best fit the data. Linear regression never adjusts the parameters of variables because all parameters are clearly defined. Least squares create a residual that accounts for the difference between actual value of known dependent variables and the predicted value of unknown independent variables. Again, linear regression never has to make any assumptions or predictions during the procedure. In a lot of ways, linear regression procedures are much simpler than those of least squares.
As the name suggests, linear regression plots its findings in a perfectly straight line that unmistakably distinguishes a trend. Least squares plots its findings in both a curve and a straight line, depending on the data being analyzed. Whether a least squares plots a curved or straight line depends entirely on the nature of the residual. If the residual shows many problems in the relation between the predicted and known variable values, the line will plot as a curve. But if the residual shows very few disruptions between the predicted and known values, it will plot as a straight line.
Least squares is used for data fitting and system interpretation with many unknown variables. Linear regression, on the other hand, is used particularly to show trend lines by analyzing well-defined data. Least squares has the potential to predict trends, which opens up the findings to error. Linear regression doesn't make an error; rather, it clearly shows trends between variables because it does not have to contest with unknown variables. Linear regression applies to depicting things that are already known.