TITLE: If the product of two continuous functions is zero, must one of the functions be zero?
QUESTION [9 upvotes]: 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$ ?

REPLY [3 votes]: 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]$.