From Simple to Multiple Linear Regression
What you'll learn: How to extend linear regression from one input feature to many, and what this looks like geometrically.
The Leap from One to Many Features
In simple linear regression, you predicted an outcome using just one feature—like predicting house price from square footage alone. But real-world predictions rarely depend on a single variable. What if you also know the number of bedrooms, the age of the house, and the neighborhood quality?
Multiple linear regression extends the same core idea to handle multiple input features simultaneously. Instead of fitting a line in 2D, you're fitting a hyperplane in higher-dimensional space.
The Model Changes Shape
Simple regression looked like: y = β₀ + β₁x
Multiple regression becomes: y = β₀ + β₁x₁ + β₂x₂ + β₃x₃ + ... + βₙxₙ
Each feature gets its own coefficient (slope). The intercept β₀ remains, but now you have multiple "directions" to move in. Think of each coefficient as answering: "holding everything else constant, how much does y change when this particular feature increases by one unit?"
Geometric Intuition in Higher Dimensions
- 1 feature: You fit a line through points on a 2D plane
- 2 features: You fit a plane through points in 3D space
- 3+ features: You fit a hyperplane in 4D, 5D, or higher (impossible to visualize, but mathematically identical)
The same principles still apply: you minimize mean squared error, find residuals as vertical distances to your fitted surface, and use the same closed-form solution (now with matrices instead of scalars).
Key Takeaway: Multiple linear regression generalizes simple regression from one feature to many by adding more coefficients—one per feature—while keeping the same linear structure and least-squares optimization approach.