Let $X$ and $Y$ be metric spaces, $f: X \to Y$ is continuous, $S \subset Y$, and $S$ open. Prove that $f^{-1}(S)$ is open, where $f^{-1}(S) = \{x \in X : f(x) \in S\}$.
If $x \in f^{-1}(S)$, then $f(x) \in S$ and since $S$ is open, there exists a $\epsilon > 0$ such that for all $y \in X$, $d(f(x), f(y)) < \epsilon$, $f(y) \in S$. Since $f$ is continuous, we can find a $\delta > 0$ such that $d(x, y) < \delta$ implies $d(f(x), f(y)) < \epsilon$. Thus $d(x, y) < \delta$ implies that $f(y) \in S$, so $y \in f^{-1}(S)$. Therefore $f^{-1}(S)$ is open.
This was marked incorrect on my exam, and now that I read over it, I'm not sure it makes any sense. I think I am having trouble integrating the concept of openness with the definition of continuity, because an open ball is a set of elements and continuity is just comparing different elements using metrics.
Marked incorrect? Doesn't make any sense? I think you got the spirit of the proof down. Did you not receive any points? If so, I would defend my answer to the professor. My proof is as follows:
Let $x \in f^{-1}(S)$. We want to find some $\delta > 0$ such that $B(x, \delta) \subseteq f^{-1}(S)$, and this will show $f^{-1}(S)$ is open.
But $x \in f^{-1}(S)$ implies $f(x) \in S$. Since $f(x)$ is in $S$ and $S$ is open, there is some $\epsilon > 0$ such that $B(f(x), \epsilon) \subseteq S$. But since $f$ is continuous, we know there exists a $\delta > 0$ such that $f(B(x, \delta)) \subseteq B(f(x), \epsilon)$. But since $B(f(x), \epsilon) \subseteq S$, this implies $B(x, \delta) \subseteq f^{-1}(S)$. Thus, we found a $\delta > 0$ such that $B(x, \delta) \subseteq f^{-1}(S)$, and since $x$ was arbitrary, this shows $f^{-1}(S)$ is open.
As you can see, it's very similar in idea to yours.