Continuity of the sum of continuous functions Let $X$ be a topological space and $f:X\to \mathbb{R}$ and $g:X\to \mathbb{R}$ be continuous functions. How do I show that $h:X\to \mathbb{R}$ where $h:=f+g$ is continuous, would prefer to use the general definition so for and open $U$ in $\mathbb{R}$, $h^-(U)$ is open. Also if $Y$ is another top space and $k:Y\to \mathbb{R}$ is also a continuous function, how do I show $l:X\times Y\to \mathbb{R}$, defined by $l:=f+k$ is also continuous. Any help please. Thanks in advance. 
 A: You should consider the maps


*

*$(f,g)\colon X → ℝ × ℝ,\; x ↦ (f(x),g(x))$,

*$f × k \colon X × Y → ℝ × ℝ,\; (x,y) ↦ (f(x),k(y))$, and

*$(+)\colon ℝ × ℝ → ℝ,\; (a,b) ↦ a+b$.


If you can show continuity for all of these maps, you have also shown continuity for $f + g = (+) ∘ (f,g)$ and $f + k = (+) ∘ (f × k)$ (not sure if “$f+k$” isn’t a bit of a misleading notation here).

For the continuity of $(+)$: For any $c ∈ ℝ$, every $ε/2$-maximum-ball around any preimage $(a,b) ∈ (+)^{-1}(c)$ stays within an $ε$-ball of $c$ by the triangle inequality. This implies that preimages of open sets are open. (Essentially: $|(a' + b') - (a + b)| ≤ |a-a'| + |b-b'|$.)
A: Let us define the shift in x operator:
  \begin{eqnarray}
  S_x : \mathbb{R}^2  &\to& \mathbb{R}^2 \\
    (x,y) &\mapsto& (x + x, y+x)
  \end{eqnarray}
It is easy to prove that this is continuous using open balls.
Pick $(x,y) \in \mathbb{R}$ then $S_x(x)=(2x, x+y)$. An arbitrary open ball around 
$S_x[(x,y)]$ is $B[ (2x, x+y), r]$,  Now $S^{-1}[B(2x, x+y),r]] = B[(x,y),r]$, 
so $S_x$ is continuous.
Define 
\begin{eqnarray}
h : X &\to& \mathbb{R}^2 \\
    x &\mapsto& (f(x), g(x)).
  \end{eqnarray}
Let us now assume that $f : X \to \mathbb{R}$, and $g : X \to \mathbb{R}$ are continuous.
We show that
\begin{eqnarray}
f+g : X &\to& \mathbb{R} \\
      x &\mapsto& f(x) + g(x)
    \end{eqnarray}
is continuous.
Since
\begin{equation}
 S_x[h(x)]= [2 f(x), f(x)+g(x)]
\end{equation}
and:
(i) Since $f(x)$ and $g(x)$ are continuous then $h(x)$ is continuous,
      from the product topology continuity of a function is equivalent of continuity of all its projections.
(ii) The function composition is continuous, that is
    $S_x \circ h: A \to \mathbb{R}^2$ is continuous.
(iii) Since $S_x \circ h$ is continuous its components $ 2 f(x)$ and
    $f(x)+g(x)$ are continuous.
So $f+g$ is continuous.
