Meaning of linearity in statistics vs linearity in linear algebra I've noticed that in Statistics, when the topic of "linearity" comes up, what is usually meant is that a fit can be made with a function of the form
$\mathbb{R} \mapsto \mathbb{R}: y(x)= mx+q$
Now in linear algebra this is obviously not true (equations of the form y=mx+q are not necessarily linear).
Am i mistaking something or is this just a point where statisticans and mathematicians use the same words for different things?
 A: It is true that in the context of linear algebra, the function $f(x) = mx + q$ is not considered to be "linear" (except in the case that $q = 0$). Instead, such a function would be called affine.
However, the equation $y = mx + q$ is considered a "linear equation" in the context of linear algebra. An equation is considered linear if it can be written in the form $f(x) = b$ for some linear function $x$. In this case, we could take $f(x) = mx$ and $b = y-q$.
A: It is not the case that "linear" means only one thing in statistics.
Say you have data points $\big( (x_i,y_i):i=1,\ldots,n\big)$ and you find the values $\widehat\alpha,\widehat\beta$ for which the sum of squares of residuals $\sum_{i=1}^n \left(y_i-\widehat {y\,}_i\right)^2 = \sum_{i=1}^n \left(y_i - (\widehat\alpha + \widehat \beta x_i) \right)^2,$ is as small as possible.
Then the pair $\left(\widehat\alpha,\widehat\beta\right)$ depends on the vector $(y_1,\ldots,y_n)$ in a linear way and depends on $(x_1,\ldots,x_n)$ in a nonlinear way, and that is exactly the meaning the term has in linear algebra. And that is why fitting a polynomial is considered linear regression just as much as fitting a straight line is linear regression. It is not because one is fitting a line that it is called linear.
However, one says that correlation is a measure of "linear" dependence between the two variables, and there the terms "linear" and "linear dependence" do not mean the same thing they mean in linear algebra, and in this case it is about fitting a line.
