Let $X$ be a set and let $(Y, \tau )$ be a topological space. Let $g : X \to Y$ be a given map. Define $$ \tau' = \{ U\subset X\ :\ U = g^{-1}(V) \ \text{ for some}\ V \in \tau\}$$
To prove $\tau'$ defines a topology on $X$.
Since $g^{-1}$ preserves intersections and unions, $\tau$ satisfies axiom (ii) and (iii) for a topological space. Now, I have a doubt that how to ensure that $X \in \tau'$?
$Y \in \tau$ and $g^{-1}[Y] = \{x \in X: g(x) \in Y\} = X$.