6

I studied a linear function definition in our Machine Learning course:

f(ax + by) = af(x) + bf(y)

Using this definition, we can prove that y = ax + b is NOT a linear function. This is counter-intuitive to me.

For example: f(x) = 2x + 3 is NOT linear.
f(0 + 1) = f(1) = 5
but f(0)+f(1) = 3+ 5 = 8. 
Hence f(0+ 1) != f(0)+f(1)

We all know that y = ax + b is a line function (I know this is a linear function for ages), but it is not linear according to this definition. I am very confused.

In what situation we should use the above definition?

Recourse:

https://homepage.divms.uiowa.edu/~idarcy/COURSES/34/linearfn2s.pdf

Di Wang
  • 511
  • For better or for worse, linear functions need $f(0) = 0$, and the more general "linear" functions with $f(0)\neq 0$ are called affine. This is just notation, but I don't know how it came about. See answers here https://math.stackexchange.com/questions/1623211/why-is-a-linear-transformation-called-linear – Calvin Khor Sep 18 '18 at 05:19
  • 2
    The short answer is that functions of the form $y=ax+b$ have their graphs in the form of a line, and so got their name. In the context of vector spaces and linear algebra, etc..., the property that some functions have that $f(ax+by)=af(x)+bf(y)$ is incredibly useful and so a whole branch of mathematics was formed to study these examples more deeply. We happened to give such functions the name "linear functions" despite the fact that this name (or something like it) was already in use for something different. Sometimes words are reused in maths to mean different things (e.g. Regular). – JMoravitz Sep 18 '18 at 05:29
  • Consider the comically large number of different uses of the word regular and normal in mathematics. – JMoravitz Sep 18 '18 at 05:31

2 Answers2

3

linear function $\neq$ linear polynomial

The former is what you have defined in your Machine learning course. The latter is functions like $ax+b$. See wikipedia for more details and context.

Linear functions are very important in the subject of linear algebra.

vadim123
  • 82,796
2

The equation $y=ax+b$ is the composition of a linear function $y=ax$ with a translation $b$. Even if $y=ax+b$ is not linear it preserves some properties of the related linear function and it is denoted as an affine function and more precisely as an affine line in that case.

user
  • 154,566