# Is continuous function $f:X=A \cup B \rightarrow \{-1,1\}$ constant? [closed]

Let $A$ and $B$ be disjoint. Let $X$ be a topological space.

Is every continuous function $f:X=A \cup B \rightarrow \{-1,1\}$ constant?

-

## closed as off-topic by ᴡᴏʀᴅs, Claude Leibovici, PVAL, heropup, ShuchangAug 14 '14 at 7:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – ᴡᴏʀᴅs, Claude Leibovici, PVAL, heropup, Shuchang
If this question can be reworded to fit the rules in the help center, please edit the question.

What is the topology of $\{-1,1\}$? – Neal Dec 14 '12 at 13:59
What is the topology of X? :) – madprob Dec 14 '12 at 14:31

Claim: A topological space $\,X\,$ is connected iff there is not a continuous surjective function $\,f:X\to\{0,1\}\,$ , taking $\,\{0,1\}\,$ with the inherited euclidean (i.e. the usual one) topology on $\,\Bbb R\,$
Of course, we can always take $\,\{-1,1\}\,$ instead of $\,\{0,1\}\,$
Let $A=(-2,-1)$ and $B=(1,2)$. Then let $f(x)=\mbox{sign}(x)=x/|x|$. Then $f$ is continuous but not constant.