Showing if something is continuous in Topology If $f : X \to \mathbb{R}$ is continuous,
I want to show that $(cf)(x) = cf(x)$ is continuous, where $c$ is a constant.
Attempt: If $f$ is continuous, then we want to show that the inverse image of every open set in $\mathbb{R}$ is an open set of $X$. Choose an open interval in $\mathbb{R}$. 
Thats as far as I got. :(
 A: 
Let $g:\mathbb R\to \mathbb R$ be $g(y)=cy$. Your function is $g\circ f$.  - Willie Wong

The continuity of $g$ is shown by directly verifying that the preimage of any open interval is an open interval. (The case $c=0$ is somewhat exceptional and can be dealt with separately: constant maps are easily seen to be continuous.)
You will likely have other opportunities to turn arithmetical operations into composition: e.g., the product $fg$ is the composition of the map $(f,g):X\to\mathbb R^2$ with the multiplication map $h:\mathbb R^2\to \mathbb R$ defined by $h(u,v)=uv$. To show that $fg$ is continuous, it suffices to check the continuity of $h$. 
A: An alternative answer, that does not require you to prove the composition of continuous functions is continuous:
Let $U\subset\mathbb{R}$ be open. In fact we may assume $U=(a,b)$ by taking the open balls as a base for $\mathbb{R}$.
Now,
$$
(cf)^{-1}(U) = \{ x\in X: \exists y\in(a,b): (cf)(x) = y\}
= \left\{x\in X:\exists y\in(a,b): f(x)=\frac{y}{c}\right\}
$$
$$
=\left\{x\in X: \exists z\in \left(\frac{a}{c},\frac{b}{c}\right): f(x)=z\right\}
$$
and this last set is precisely $$f^{-1}\left\{\left(\frac{a}{c},\frac{b}{c}\right)\right\},$$ which is open since $f$ is continuous.
