TITLE: About continuity
QUESTION [7 upvotes]: one question is disturbing me :
let f and g two continuous (real-valued) functions on the unit interval [0,1] with the property that 
$[f(x)-f(y)][g(x)-g(y)]=0 ,\forall x,y \in [0,1]$.
To my opinion, one of the two functions, $f$ or $g$, must be a constant function.
Am i right ? If so, how can we prove it ?
Or perhaps, that's totally silly and i would appreciate a counter-example.
Many Thanks,
Alan

REPLY [2 votes]: Without losing generality, $f(0)=g(0)=0$. The idea is to take $f$ which is not identically zero and then prove that $g$ must be identically zero. We can write
$$\forall y\quad f(y) g(y) =0.$$
Take $A=\{y:\,f(y)\ne 0\}\subset(0,1]$.
If $A=\emptyset$, then we are done, so we will suppose $A\ne \emptyset$.
Obviously, $\forall y\in A$ we have $g(y)=0$.
If $A=(0,1]$, then $g(z)$ is equal to zero for $z=0$ and for $z\in A$, i.e. $g$ is identically zero on $[0,1]$.
Take $z\in (0,1]\setminus   A$ such that $g(z)\ne 0$  - if there're no such $z$, then we are done, because $g$ would be $0$ on both $A$ and $[0,1]\setminus A$.
Take $y\in A$, then
$$(f(z)-f(y))(g(z)-g(y))=0$$
by hypothesis, yet
it simplifies to
$$ f(y)  g(z) =0,$$
which implies that $g(z)=0$ (i.e. contradiction).
So indeed your hypothesis holds: one of the functions must be constant.