Hope this isn't a duplicate.
Let $(X,\tau)$ be an arbitrary topological space and let us consider $\Bbb R$ with the usual topology.Let $\mathscr{C}(X,\Bbb R)$ denote the collection of all continuous functions from $X \to \Bbb R$ . My question is whether $\mathscr{C}(X,\Bbb R)$ is always closed under pointwise addition, pointwise multiplication and similar properties i.e. $$(*) \text { } f,g \in \mathscr{C}(X,\Bbb R) \implies f+g \in \mathscr{C}(X,\Bbb R)$$ $$(**) \text { } f,g \in \mathscr{C}(X,\Bbb R) \implies fg \in \mathscr{C}(X,\Bbb R)$$ $$(***) \text { } f\in \mathscr{C}(X,\Bbb R) \implies -f \in \mathscr{C}(X,\Bbb R)$$
Yes. Since $f$ and $g$ are continuous, the map $(f,g):X\times X\to \mathbb R\times \mathbb R$ defined by $(x_1,_2)\mapsto (f(x_1),g(x_2))$ is continuous. Furthermore, addition and multiplication are continuous maps from $\mathbb R\times \mathbb R\to \mathbb R$. Therefore, the following composition is continuous $$ X\stackrel{x\mapsto (x,x)}\longrightarrow X\times X\stackrel{(f,g)}\longrightarrow \mathbb R\times \mathbb R\stackrel{+}\longrightarrow \mathbb R $$ proving $f+g$ is continuous. The same works for $fg$.
Negation is even easier, as $-f=\eta\circ f$, where $\eta$ is the negation map on $\mathbb R$, which is continuous.