# Continuity of a Characteristic function

Let $A$ be a subset of $\mathbb{R}^n$. Show that the characteristic function $\chi_A$ is continuous on the interior of $A$ and on $A^c$ but discontinuous on the boundary of $A$.

My attempt:

Suppose $\chi_A$ is continuous on the boundary of $A$, then for all $x$ on the boundary the limit of the function at $x$ equals the function evaluated at $x$. Therefore for $x$ on the boundary, the pre-image of the function evaluated at $x$ is an open set since the function is continuous. However, for $B_r(x)$, $r>0$ contains parts of $A$ and $A^c$, therefore the function would take on two values for a point in the domain, which contradicts the fact that $\chi_A$ is a function.

-
Don't you mean $X_A$ or rather $\chi _A$ (\chi)? – Git Gud Jan 22 '13 at 18:45
Your reasoning is fine. You don't need to reason by contradiction. If $x$ is on the boundary, then any open set containing $x$ intersects $A$ and $A^C$. Hence on any open set containing $x$, the characteristic function takes values $0$ and $1$. So, for $\epsilon = \frac{1}{2}$, there cannot exist a neighborhood of $x$ such that $|1_A(x) -1_A(y)| < \epsilon$ for $y$ in the neighborhood. – copper.hat Jan 22 '13 at 18:45
the chi version – bobdylan Jan 22 '13 at 18:54
Presumably "and on $A^c$" should be "and on the interior of $A^c$". – Andreas Blass Jan 22 '13 at 19:55