How can I check a function is linear or not? I've searched about it and got the following formula: $f(x+y) = f(x)+f(y)$.
How can I use the above formula to determine whether these functions are linear? $f(x) = x+4$
$f(x) = 5$
and can anyone tell me what are "affine functions"? My teacher told me that$ f(x) = x+4$ is not linear, it is an affine function which is close to linear but is not linear.
Thanks in advance
$\endgroup$ 43 Answers
$\begingroup$For $f(x) = x + 4$ we have: $f(a+b) = a + b + 4 \neq f(a) + f(b) = a + b + 8$
Similarly for $g(x) = 5$, $g(a+b) = 5 \neq g(a) + g(b) = 5 + 5 = 10$
$\endgroup$ $\begingroup$You know that a linear function satisfies the following property: $$f(a+b)=f(a)+f(b)$$ and you want to determine whether a particular function $g$ is linear, so you just check whether this property holds. For example, we define the function $g$ as $x\mapsto 6x+1$, thus: \begin{align*} g(a+b) = 6(a+b)+1 &= 6a+6b+1 \\ &\boldsymbol{\neq} 6a + 6b+2=6a+1+6b+1=g(a)+g(b). \end{align*} Therefore, $g$ is not a linear function.
$\endgroup$ $\begingroup$You can find the properties for linear functions on wikipedia.
for f(x) = x+4, do:
f(ax) = ax + 4 != a*f(x) = ax+4a
which violates the property of linear function, so it is not a linear.
for f(x) = 5, it is similar.
I'm not sure about what is a fine function.
$\endgroup$