The normal equation for linear regression is :

**β=(XTX)-1XTY**

This is also known as the **closed-form solution** for a linear regression model.

where,

**Y=βTX** is the equation that represents the model for the linear regression,

**Y** is the dependent variable or target column,

**β** is the vector of the estimates of the regression coefficient, which is arrived at using the normal equation,

**X** is the feature matrix that contains all the features in the form of columns. The thing to note down here is that the first column in the X matrix consists of all 1s, to incorporate the offset value for the regression line.