# Is this function linear?

When you modify a linear function to make it discontinuous by introducing division by $0$, will it make the function non-linear? Please see the example below.

$$x \to \frac{x^2+1}{x} - \frac{1}{x}$$

-
When $x\neq 0$, your function is $x\mapsto x$. When $x=0$, the function isn't defined. What is the domain supposed to be? If it is, say, the set of real numbers $\mathbb R$, then it is not linear in part because it is not even defined on all of $\mathbb R$. If you extended the function to send $0$ to $0$, then yes, it would be the linear function $x\mapsto x$, a.k.a. the identity function. –  Jonas Meyer Jan 16 '12 at 7:05
Your example function is the function $f(x) = x$ if $x \neq 0$, with domain $\mathbb{R} \setminus \{0\}$. Strictly speaking, it is not a linear function, because a linear function should be defined on all of $\mathbb{R}$. Instead, $f$ is the restriction of a linear function (in fact, the identity function) to $\mathbb{R} \setminus \{0\}$. So the fact that $f$ is not linear is more a reflection that you choose a poor way to define your function, rather than any inherent non-linear character to the function $f$. –  Michael Joyce Jan 16 '12 at 7:08