# Epsilon-Delta continuity definition for straight lines parallel to axes

I am taking a course on real analysis online and I encountered the $\epsilon-\delta$ definition for a function to be continuous.

But I wonder if I can apply it to functions which are straight lines parallel to axes. Because if say $f(x)=2$ then $\epsilon$ will be never greater than zero, because the codomain is restricted to a single value. But in $\epsilon-\delta$ definition we check for $\epsilon>0$. So does the $\epsilon-\delta$ definition to check continuity of a function applies here?

-
Of course the definition is correct to check the continuity of constant funcitons. –  Shine Jul 24 '14 at 14:37
But how? I am unable to understand. My crude understanding is for all Epsilon greater than 0 as f(x) becomes epsilon close to L there should be some delta > 0 so that x becomes delta close to x0. But here in straight line case epsilon is zero. So how do I apply the definition? –  Durin Jul 24 '14 at 14:40
For constant funciton, say $f(x)=2$, use the definition of continuity to check its continuity at fixed point $x_0$, for any $\epsilon >0$, there exists $\delta >0$, for any $x$ such that $|x-x_0|<\delta$, we have $|f(x)-f(x_0)|=0< \epsilon$. So $f$ is continuous at $x_0$. –  Shine Jul 24 '14 at 14:40
By the way: functions are not the same as graphs. If $f(x) =2$ for all $x$ then the graph is a straight line parallel to the $x$-axis. The corresponding property of the function is constant. So your question could be better worded as “$\epsilon$-$\delta$ continuity definition for constant functions.” –  Matthew Leingang Jul 24 '14 at 19:44

You have to keep in mind what $\epsilon$ is requiring the function to do. Take a constant function $f(x) = 2$ as you asked.
The $\epsilon-\delta$ definition demands that, for any $\epsilon > 0$ we can find a $\delta >0$ so that if $x$ is within $\delta$ of $a$, $f(x)$ is within $\epsilon$ of $f(a)$ But in the case of our constant function, $f(x)=2$ and $f(a) = 2$, so $f(x)$ is within $\epsilon$ of $f(a)$ for any $\epsilon$. Therefore any $\delta$ will do.
I think your question comes from thinking of $\epsilon$ as something that comes from the function; $\epsilon$ does not care about $f$!
Yes. It surely does. The $\epsilon$ band doesn't have to be a subset of the codomain. You can choose the value of $\epsilon > 0$ yourself. The task is to find a suitable $\delta$.