3
$\begingroup$

If $f : \mathbb{R}^{n} \rightarrow \mathbb{R}^m$ and $g : \mathbb{R}^m \rightarrow \mathbb{R}^p$ are functions such that $g \circ f$ differentiable does it mean both are differentiable ? I just need this for differential geometry. Suppose I know the following fact $proj : \mathbb{R}^m \rightarrow \mathbb{R}$ and $u : \mathbb{R}^n \rightarrow \mathbb{R}^m$ where $proj \circ u$ is differentiable does it mean that u is differentiable ? Here proj is the regular projection function.

$\endgroup$
8
  • 3
    $\begingroup$ Take $f$ any function and $g=0$. $\endgroup$
    – Aloizio Macedo
    Oct 2, 2016 at 0:24
  • $\begingroup$ when what I said holds ? $\endgroup$
    – user111750
    Oct 2, 2016 at 0:26
  • $\begingroup$ As Aloizio notes, you need to impose more conditions on $f$ and $g$ to get something interesting. $\endgroup$
    – Daniel
    Oct 2, 2016 at 0:27
  • 2
    $\begingroup$ @Adeek: It would be good to ask your edited question (I suspect you mean to ask whether, if the coordinate projections of $u$ are all differentiable, is $u$ itself differentiable) as a separate question rather than edit here. The difference is large enough that the existing answers don't do much to answer the amended question. $\endgroup$ Oct 2, 2016 at 6:29
  • 1
    $\begingroup$ Seconding @HenningMakholm 's suggestion. I note that you have accepted an answer to your original question that does not answer the new one. Please revert this one to the way it was, leave it here since it's interesting, and ask the new one as a new question. $\endgroup$ Oct 2, 2016 at 18:52

3 Answers 3

15
$\begingroup$

No.

Let both $f$ and $g$ be the famous function that takes rational numbers to $1$ and irrational numbers to $0$. Then, since $g$ takes all numbers to rational numbers, $(f\circ g)(x) = f(g(x))=1$, which is certainly differentiable. But neither $f$ nor $g$ is continuous anywhere, much less differentiable.

$\endgroup$
3
  • $\begingroup$ I have edited my question @rory Daulton. $\endgroup$
    – user111750
    Oct 2, 2016 at 0:34
  • 2
    $\begingroup$ I think it should be $f(g(x)) = 1$ since $g(x)$ is rational and $f$ takes rational numbers to $1$. $\endgroup$
    – Lorenz
    Oct 2, 2016 at 9:27
  • $\begingroup$ @frececroka: Oops, you are right, how embarrassing. I'll edit that now. Thanks for the correction. $\endgroup$ Oct 2, 2016 at 10:51
9
$\begingroup$

No, neither $f$ nor $g$ needs to be differentiable.

Take e.g. $f$ to be the sign function and take $g$ to be the absolute value function on $\mathbb{R}$.

Neither is differentiable at $x=0$, but the composition is constant $=1$.

The answer to the second question is also no: Composing e.g. $u(x, y)=(0, \left|x \right|)$ with the projection onto the first component gives the constant function $=0$.

$\endgroup$
3
  • $\begingroup$ I have edited my question @damian Reding can you please check it. $\endgroup$
    – user111750
    Oct 2, 2016 at 0:38
  • $\begingroup$ What kind of sign function are you using? The one described in Wikipedia - and the one I know - has $sgn(0) = 0$. $\endgroup$ Oct 2, 2016 at 18:44
  • $\begingroup$ True. Here you need $sgn(0)=1$. $\endgroup$ Oct 2, 2016 at 18:58
3
$\begingroup$

Just adding another fun example: $f(x)=|x|$ and $g(x)=x^2$. This is why it is often better to use $g$, a smooth funcition, as your notion of distance in contexts like linear regression.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy