# What is the definition of a linear function?

I'm curious what the definition of a linear function really is? I always hear that a linear function is a "straight line." That really isn't a definition- just a result.

Based on the real definition, how is an inversely proportional function not linear (i.e. $y=(a/x)$?

-
A linear function is one that satisfies $f(\lambda x) = \lambda f(x)$, for all appropriate scalars $\lambda$, and $f(x+y) = f(x)+f(y)$. This presupposes that $\lambda x$ and $x+y$ make sense, of course. People often use the term linear for an affine function (constant plus a linear function). I'm not sure what you meant by an 'inversely proportional function'. –  copper.hat Oct 3 '12 at 16:07
Thanks, I fixed the inversely proportional function - wrote it wrong the first time. –  Bob Oct 3 '12 at 16:08
$\frac{a}{2x} \neq 2 \frac{a}{x}$. So $f(2x) \neq 2 f(x)$. –  copper.hat Oct 3 '12 at 16:09
For avoiding of any confusion, always think about what's the domain and range of your function. –  Jack Oct 3 '12 at 16:09

A function $f$ is linear iff $f(ax)=af(x)$ and $f(x+y) =f(x) + f(y)$. This is sometimes written as one rule in the form: $$f(ax + by) = af(x)+bf(y)$$
A line has the property, so do planes. I don't know if you've studied calculus but even the derivative is linear: $$\frac{d}{dx}(af(x)+bg(x))=af'(x)+bf'(x)$$
In precalc a function is often defined as linear if it can be written in the form $f(x)=mx+b$. But the definition in the comments and the answers above are always used in more advanced math. –  Stefan Smith Oct 3 '12 at 22:35