Sometimes ( X TX) -1 can’t be calculated accurately in Excel because of an overflow error. Ridge and LASSO regression are used when X TX is not invertible or when it is close to not being invertible (such as when there is multicollinearity or when there are more independent variables than data elements. The algorithm that performs multiple linear regression calculates ( X TX) -1 where X is the design matrix.