# Imagining a Linear Regression model with more than 3 dimensions [closed]

I'm just getting started with Machine Learning and this is really bugging me now.

Assuming we could use more than 2 feature variables to train a Multiple Linear Regression model, how can we imagine the geometry of the model?

Let me elaborate.

For a linear regression model with a feature variable and a response variable, we come up with an equation of a line (y = mx + c) and for a multivariate linear regression model with 2 predictor variables, we can figure out the equation of a plane (a(x-x1)+ b(y-y1) + c (z-z1) = 0).

How can we imagine the model in 4 dimensions or more, since we are humans and as a layman, we cannot imagine higher dimensions like physicists?

## 1 Answer

Humans live in a 3 dimensional world. Consequently it can be hard for us to visualise anything beyond 3 dimensions. For 4 dimensions, we can perhaps think about time as the next dimension, so we might think about how a 3 dimensional image changes over time. Even that is quite tricky, so for 5 dimensions and above it is basically impossible.

Rather than trying to visualise a model in terms of geometry, it may be better to understand how models work by using linear algebra (ie matrix algebra)

• That's a good direction but I've recently learned, from my experience, that mathematics is an extremely visual subject. I guess that's why I'm longing to visualize this. It would be great if you can suggest to me articles or resources which would help me understand the linear algebra behind linear regression, from your perspective. One particular resource I've used is 3Blue1Brown. – Sachin Krishna Aug 27 '20 at 10:46
• Some people are naturally visual, but others are not. I don't agree that mathematics is a visual subject generally. Some fields in mathematics lend themselves to visualisation better than others perhaps. Introduction to Linear Algebra by Gilbert Strang is a classic, and you can find his lectures on youtube too. – Robert Long Aug 27 '20 at 11:14