When is a function who is defined on two disjoint sets are continuous? Okay so let $f$ be a function, $A$ and $B$ two sets that are disjoint.
$f$ is continuous on $A$
$f$ is continuous on $B$.
My teacher told me that $f$ is continuous on these two disjoint sets if and only if they are mutually separated, meaning no one contains the boundary of the other.
I couldn't understand the reason behind this. Could someone help out?

Definitely false: an easy general method for making counterexamples is take $A$ and $B$ as disjoint subsets of some larger topological space $X$. Then take a function $f^*:X\rightarrow Y$ that is continuous, and restrict its domain to $A\cup B$ to get a new function $f:A\cup B\rightarrow Y$. This function is continuous because $f^*$ was. To make it a counterexample to your teacher's claim, all that you require is that $\overline{A}\cap\overline{B}\neq\emptyset$ (they are not separated).
