let f:U->V & g:V->W be two functions such that f and gf is continuous. Is g continuous? Assuming the composition is well defined. Here U,V,W are topological spaces.
It should be continuous if gf is preserved to be continuous. If you are maintaining continuity then it means that any deformation of the space has to be continuous if you start off with something continuous.
An easier way to think of it is this: pretend that you are starting at a situation where f is already applied. Now you know that applying g will result in a continuous deformation since gf is continuous. Therefore you have to conclude that applying g as if you were starting from something where f was applied is continuous.
You could do this by a proof of contradiction by assuming that in space V (which is continuous), a deformation to space W which is discontinuous provides a continuous map which should lead to a contradiction.
No, g does NOT have to be continuous.
Let U= V= W= R. Let f(x)= 0 for all x, g(x)= 0 if x is rational, 1 if x is irrational. The f is clearly continuous for all x while g is discontinuous for all x. What is g(f(x))? Is it continuous or discontinuous?