# Properties of a continuous map $f : \mathbb{R}^2\rightarrow \mathbb{R}$ with only finitely many zeroes

Let $f : \mathbb{R}^2\rightarrow \mathbb{R}$ be a continuous map such that $f(x)=0$ only for finitely many values of $x$. Which of the following is true?

• Either $f(x)\leq 0$ for all $x$ or $f(x)\geq 0$ for all $x$.
• the map $f$ is onto.
• the map $f$ is one one.
• None of the above.

What I have done so far is :

• I would take polynomial in two variables.. This need not be like $f(x)\geq 0$ for all $x$ or $f(x)\geq 0$ for all $x$.So,first option is eliminated.
• The map is not one one assuming that $f$ has more than one zero. So, third option is wrong.

I could not think of an example in which it is not onto..

Only examples i am getting in my mind are polynomials and they are onto..

So, I am having trouble with surjectiveness of the function.

Thank you..

• why down vote? Please.. – user87543 Dec 9 '13 at 10:11
• What about polynomial of degree zero? Also, the square of the euclidean norm is a polynomial. – Carsten S Dec 9 '13 at 10:12
• Think about the polynomials again: (1) They aren't onto in general, e. g. $X_1^2 + X_2^2$ isn't. (2) If they have only finitely many zeros, can they be onto? – martini Dec 9 '13 at 10:42
• I don't understand the downvote either, because the first point is far from obvious. And @PraphullaKoushik, you eliminate it a bit too quickly: your polynomial would not have finitely many roots in that case. – Jean-Claude Arbaut Dec 9 '13 at 11:38
• Also, since $f$ is any function (with given constraints) one must prove for each point that it's always true, or always wrong, or that both cases may happen. But actually, both cases never happen. Nice exercise! – Jean-Claude Arbaut Dec 9 '13 at 13:02

• Either $f(x)\leq 0$ for all $x$ or $f(x)\geq 0$ for all $x$.

This one is the most interesting. It can happen that $f$ does not change sign under these conditions: take $u^2+v^2$ for example (if you write $x=(u,v)$). It is positive and has finitely many (one single) zeros. You can have any given number of zeros with $\prod_{i=1}^n \left((u-u_i)^2+(v-v_i)^2\right)$. Notice none of these polynomials ever changes sign.

Now, interestingly, if a continuous function $f$ of $\Bbb R^2 \to \Bbb R$ has finitely many zeros, then it can never change sign.

Assume the contrary, then there are two points x and y such that $f(x)>0$ and $f(y)<0$. Since it has only finitely many zeros, it must be positive for infinitely many points, or negative for infinitely many points, or both. Assume the former, without loss of generality because otherwise you could take $-f$. So, $f$ is positive for infinitely many points (and maybe also negative for infinitely many others, but we don't care).

Draw a ray from $y$, in any direction $d$. If it "hits" a positive value of $f$, that is $f(y+\lambda_d d)>0$ for some $\lambda_d>0$, then there is a zero of $f$ lying between $y_d=y+\lambda_d d$, and $y$, by continuity of $f$, and especially by continuity of the restriction, $\lambda \to f(y+\lambda d)$.

Now, two cases may happen:

• for infinitely many directions, you can find such a $y_d$, thus there are infinitely many zeros of $f$ (they are all different, since they are on different rays), contradiction.

• you can find only finitely many such directions. Thus, for infinitely many directions, you find only negative or null values along the ray. Now, draw a circle centered at $y$, with radius larger than $|x-y|$, so that your point $x$ is inside the circle. For infinitely many points $t_i$ on this circle, $f(t_i) \leq 0$. But $f$ has finitely many zeros, thus indeed, for infinitely many points $x_i$ on this circle, $f(x_i) < 0$ (with strict inequality). But then, trace rays between $x_i$ and $x$, and you will find again infinitely many zeros of $f$, hence again a contradiction.

And you are done.

The proof looks rather convoluted to me, maybe there is some obvious argument I didn't see.

By the way, it's trivial to generalize to $\Bbb R^n$ for $n>1$: just pick the restriction of $f$ to a plane where it would take on both positive and negative values.

I'll try to add a bit of intuition. Sadly, I don't have a scanner to show pictures...

It is easy to find a polynomial that has any given number $n$ of zeros, as shown above. But these examples are either always negative or always positive, so you can't get any conclusion from it. Remember, you are in $\Bbb R^2 \to \Bbb R$, thus polynomials don't have necessarily finitely many zeros! And actually, you often get a curve of zeros, and it's a usual way to define curves, for example the unit circle, defined as zeros of $(u,v) \to u^2+v^2-1$.

Now, assume $f$ takes on both positive and negative values. Then $f^{-1}(]-\infty,0[)$ and $f^{-1}(]0, +\infty[)$ are both open sets. My idea was that if both are nonempty, the boundary can't be finite.

Now, the easiest way to find a zero of a continuous function is if it is a function of one variable, and you know it has a positive and a negative value: you just have to use the good old bisection algorithm.

Thus, drawing rays (or half-lines) enables you to look only at functions of one variable. The only thing that remains to do is finding enough zeros, that is enough directions, to lend to a contradiction.

Even if the two other points in the question have easy counterexamples, it's interesting to see if they can happen at all.

• the map $f$ is onto.

That is, surjective.

Not necessarily. Take $(u,v) \to \frac{1}{1+u^2+v^2}$, which has finitely many (none) zeros, and is bounded.

But, as seen in the answer to the first case, $f$ can't change sign, thus it is always $\leq 0$ or always $\geq 0$, thus certainly never onto $\Bbb R$.

• the map $f$ is one one.

Not if there is more than one zero, of course, and we saw examples above.

But, could it happen at all? No, there is a proof here: Is there a continuous bijection from $\mathbb{R}$ to $\mathbb{R}^2$. You can also conclude using the fact that if $f$ is continuous and bijective, it has one zero, hence it does no change sign, contradiction because then it can't be bijective.

• It is very big... It takes sometime for me to digest... I would soon tell if there is any problem.. Thank you so much for spending your time... :) – user87543 Dec 9 '13 at 11:45
• The proof of "sign change implies infinitely many zeros" can indeed be shortened: Suppose, without loss of generality, that $f(-1,0) < 0$ and $f(1, 0) > 0$. By continuity of $f$, there is $\delta > 0$ such that $f(-1, y) < 0$ and $f(1, y) > 0$ for $|y| < \delta$. For each $y$ with $|y| < \delta$, the intermediate value theorem implies there is a zero of $f$ on the horizontal segment $[-1, 1] \times\{y\}$. – Andrew D. Hwang Dec 9 '13 at 13:02
• @user86418. Nice ;-) – Jean-Claude Arbaut Dec 9 '13 at 13:10
• I have a suggestion which might simplify the proof of $$f\ \text{changes sign}\Rightarrow f\ \text{has infinitely many zeroes}.$$Assume that $f(x)<0$ and $f(y)>0$. Then for every continuous path $\phi_{xy}$ starting at $x$ and ending at $y$ the continuous function $f\circ \phi_{xy}$ changes sign, and so it has a zero by the intermediate value theorem. (P.S.: I had overlooked the similar idea user86418 has submitted before me.) – Giuseppe Negro Dec 9 '13 at 13:11
• @Vikrant: There's at least one zero for each $y$ with $|y| < \delta$, and distinct $y$ give distinct zeros (because the corresponding segments are disjoint). :) – Andrew D. Hwang May 23 '15 at 12:28