Continuous function iff $p \not\in fr(A)$ Let $M$ be a metric space, $A \subset M$ and let $\chi_A: M \to \mathbb{R}$ be a map defined by:
$$\chi_A(x)=
\begin{cases}
1 & \text{if $x \in A$} \\
0 & \text{if $x \not\in A$}
\end{cases}$$
For a $p \in M$, show that $\chi_A$ is continuous map in $p$ if and only if $p \not\in fr(A)$.
My idea was supposing that $p \in fr(A)$ and try to get a contradiction, but I couldn't reach a solid result. Any leads?

$M$ splits into $3$ disjoint sets: $M=\operatorname{int}(A) \cup \operatorname{int}(A^\complement) \cup \operatorname{Fr}(A)$, based on whether $x$ has a ball inside $A$, a ball inside $A^\complement$, or whether every ball around $x$ intersects both $A$ and $A^\complement$.
In the former two cases there is one $\delta$ that works for all $\varepsilon>0$ (the function is locally constant). In the latter no $\delta>0$ can work for $\varepsilon = \frac12$.
So $\chi_A$ is exactly non-continuous at $x \in \operatorname{Fr}(A)$.
