Why should we add a $\lambda$ to the matrix?
1. To reduce the value of the weights $\omega$.
2. Make $X^{T}X$ invertible.
3. Prevent overfitting
Why will $X^{T}X$ become not invertible?
$$\omega_{LMS}=(X^{T}X)^{-1}X^{T}y$$
1. Data points of X is less than the dimension of $\omega$2. Columns of X are not linear independent. Such as: a column is a duplicate of one of the features, a column is the scaled version of another. Those columns are dependent between each others.
Example: