Linear Regression is the simplest form of regression, built on the least-squares method Adrien-Marie Legendre published in 1805.[1] Its core assumption is elegance: the relationship between your input (X) and your output (Y) can be described by a straight line.
The algorithm finds the Line of Best Fit by minimising the Sum of Squared Errors — making the total distance between the data points and the line as small as possible. While basic, it is incredibly powerful for interpretation: the slope tells you exactly how much Y changes for every unit increase in X.
🏠 Use case — real estate pricing. Generally, as size increases, price increases consistently. A 2,000 sq ft house is usually double the price of a 1,000 sq ft house (all else equal). The relationship is additive and linear.
How to read this: the algorithm tried every possible line and kept the one with the smallest total squared error.






