if $h$ and $g$ are continuous, why is $f = g \circ h$ also continuous?

We had an exercise in functional analysis, which states

Show that $$f = \sin (\frac1x)$$ is continuous

Part of the solution for case $$x \neq 0$$ was:

$$\sin \text{ is continuous } \land \frac1x \text{ is continuous} \Longrightarrow f \text{ is continuous}$$

Why is that?

Furthermore, we had also examples which state $$f + g$$ is continuous if $$f$$ and $$g$$ are continuous.

What kind of literature do I need to get a better read on these properties?

• What definition of continuity are you working with? With respect to some it is almost immediate. Commented Nov 21, 2021 at 10:04
• These are basic properties about continuous functions; any book on real analysis should cover these, say baby Rudin Commented Nov 21, 2021 at 10:05
• @Keen-ameteur in this very example we have been working with the continuity definition using sequences. But for this example he just concludes from $g$ and $h$ being continuous, such that $f = g \circ h$ must be continuous too. The usual operators of $+$ and $-$ seem obvious to me. But chaining functions does not feel intuitive about the continuity property Commented Nov 21, 2021 at 10:08
• Both cases can be dealt with by double applications of $\epsilon - \delta$ approaches Commented Nov 21, 2021 at 10:20
• Well, using sequences, it's really trivial to conclude that $f = g\circ h$ is continuous. Take sequence $(x_n)$ converging to $c$. If $h$ is continuous, then what can you tell about the sequence $h(x_n)$? Now, apply the same logic to the sequence $(h(x_n))$ and continuous function $g$. Actually, it's more involved to prove that sum of two functions is continuous then it is for composition of functions. Commented Nov 21, 2021 at 10:20