# If the product of two continuous functions is zero, must one of the functions be zero? [duplicate]

Suppose that I have two continuous functions

$$f : \left[ a, b \right] \rightarrow \mathbb{R} \quad \text{and} \quad g : \left[ a, b \right] \rightarrow \mathbb{R}$$

and they have the following property

$$f(x) \times g(x) = 0 \space , \forall x \space \in \left[ a, b \right]$$

Can I say that one of the functions necessarily has to be equal to $0$?

For example, $f(x) = 0 \space , \forall x \space \in \left[ a, b \right]$.

UPDATE: Ok, I can see from the counterexamples that the affirmation is not true, but now I cannot see in which cases it is true. If I let the function $g : \left[ a, b \right] \rightarrow \mathbb{R}$ be any continuous function, then in that case must I have $f(x) = 0$ ?

• No. Play around with functions whose graphs look like /$\backslash$_/$\backslash$ ... Oct 31, 2014 at 22:37
• The functions can be piecewise zero with non-overlapping nonzero regions. It's not even enough to require infinite differentiability (you can use the funny functions of $e^{-1/x}$ type) but I think that it's not possible if you require the function to be holomorphic if extended to complex domain. Oct 31, 2014 at 23:00
• Your update is a little ambiguous. If you choose $g=1$ then you must have $f=0$. Oct 31, 2014 at 23:23
• i edited the question to better understanding.
– Mike
Oct 31, 2014 at 23:27
• This fails even for functions which are differentiable infinitely many times, but it is true for Analityc functions. The best you can obtain is that for each $x$ there exists an interval containing $x$, not necessarily open, so that one of the function is $0$ on that interval. Nov 1, 2014 at 18:28

This is not true in general. Consider $$f(x) = \left\{\begin{array}{cc} 0 & a \leq x \leq \frac{a+b}{2} \\ x - \frac{a+b}{2} & \frac{a+b}{2} < x \leq b\end{array}\right.$$ and $$g(x) = \left\{\begin{array}{cc} x - \frac{a+b}{2} & a \leq x \leq \frac{a+b}{2}\\ 0 & \frac{a+b}{2} < x \leq b \\ \end{array}\right.$$ Both are clearly continuous and not identically zero on $[a, b]$, yet $f(x)g(x) = 0$ for every $x \in [a, b]$.

Edit: In response to the updated question, the answer is yes. If we want $f(x)g(x) = 0$ for all $x \in [a, b]$ and for any arbitrary continuous function $g$, then it must be true that $f \equiv 0$ on $[a, b]$.

• For anyone looking at this and thinking “huh, I guess it’s true, but it’s a bit complicated; what’s the idea behind it” — take a moment to sketch it on paper! It’s much clearer in pictures than in formulas. Nov 1, 2014 at 0:13

No. Imagine a little "bump" around $0$, and a different "bump" around $10$. If you want something more precise, I mean a bump. Then their product will always be $0$ even though neither function is $0$.

That cannot be concluded. For example if $[a,b]=[-1,1]$ let $f(x)=x+|x|$ and $g(x)=x-|x|.$ Note if $x \ge 0$ then $g(x)=0$ while if $x \le 0$ then $f(x)=0$ so the product is zero at any $x$ in $[-1,1],$ yet neither function is the zero function.

Consider that the reals are an integral domain, so there exist no zero divisors.

Let $x\in[a,b]$, where $a,b\in\mathbb R$.
Consider a point in $f(x)g(x)$.
Assume $f(x)\ne0$.
Now $f(x)g(x)=0 \Rightarrow g(x)=0$, since $\mathbb R$ has no zero divisors.
Repeat for the assumption that $g(x)\ne0$.

So $f(x)g(x)=0 \Rightarrow f(x)=0 \lor g(x)=0$.

All that is required for the product to be zero throughout the target set is that either image is zero $\forall x\in[a,b]$.

No. For instance, take the functions, in $[-1,1]$ defined as $$f(x)=\begin{cases}0 && \text{if } x<0\\x &&\text{if }x\geq 0\end{cases}$$ $$g(x)=\begin{cases}x && \text{if } x<0\\0 &&\text{if }x\geq 0\end{cases}$$ which have zero product everywhere, but are neither constant. It is of note that, at $x=0$, both are $0$.

You can say that, if $S_f$ is the set of $x\in[a,b]$ such that $f(x)=0$ and $S_g$ is defined analogously, then $S_f\cup S_g=[a,b]$ and, moreover, if neither is empty, then $S_f\cap S_g$ is not empty either. (This follows from the fact that both sets are closed, and you cannot partition a closed interval into more than one disjoint closed set - they must intersect, at least, on their boundary)

you can say that ${\mu(f=0)}\geq\frac{b-a}{2}$ or ${\mu(g=0)}\geq\frac{b-a}{2}$ where $\mu$ denotes the lebesgue measure.

• Or more generally $\mu(f=0)+\mu(g=0)\geq 1$ Oct 31, 2014 at 22:45

They do not both have to always be zero, but one has to be zero whenever the other is not. Suppose that $\exists x$ s.t. $f(x) \ne 0$ and $g(x) \ne 0$ then clearly $f(x)g(x) \ne 0$.

• I assume you mean $f(x) \not= 0, g(x) \not= 0$?
– user88319
Oct 31, 2014 at 23:30
• Yep. Was typing quickly. Sorry about that. Oct 31, 2014 at 23:42

Just think about this. For each value of x, the images of the functions are both reals. Yes, just real numbers being multiplied! That can't be zero at least one of them is zero. So the functions has to obey that rule in [a,b].

Edit: sorry, I misinterpreted the question.

• If you post an answer that is wrong (for whatever reason), the best course of action is to just delete it. There's nothing to be ashamed of, everyone makes mistakes from time to time. (In fact, most answers I have seen deleted are by high reputation users, and I have deleted a few of my own.) Nov 1, 2014 at 3:01