# Estimating with linear regression

The first regression model that comes to our mind is **linear regression**. Does it mean fitting data points using a linear function, as its name implies? Let's explore it.

## How does linear regression work?

In simple terms, linear regression tries to fit as many of the data points as possible with a straight line in two-dimensional space or a plane in three-dimensional space. It explores the linear relationship between observations and targets, and the relationship is represented in a linear equation or weighted sum function. Given a data sample *x* with *n* features, *x*_{1}, *x*_{2}, …, *x*_{n} (*x* represents a feature vector and *x = (x*_{1}*, x*_{2}*, …, x*_{n}*)*), and weights (also called **coefficients**) of the linear regression model *w* (*w* represents a vector (*w*_{1}, *w*_{2}, …, *w*_{n})), the target *y* is expressed as follows: