So the least squares regression line itself is not a mathematical function, but a linear equation in the form of y = a+bx (where a and b are constants).
Of course, in some cases, this regression line can be regarded as a function. For example, in the case of simple linear regression (that is, there is only one independent variable), the regression line can be regarded as a functional relationship between input X and output Y. However, on the whole, it is more like a statistical model than a mathematical function.