Suppose that is continuous. Let be open and the inverse image of . If is an empty set, then it is open. Let . For any let . Since is open, it contains an ε-neighborhood of . Since is continuous, has a δ-neighborhood which is mapped into . Since , we have , so that is open because was arbitrary.
Conversely, assume that the inverse image of every open set in is an open set in . Then for every and any ε-neighborhood of , the inverse image of is open, since is open and contains . Hence also contains a δ-neighborhood of , which is mapped into because is mapped into . Consequently, by the definition, is continuous at . Since was arbitrary, is continuous. QED