Show that there is a bijection between $[S^0,X]$ and $\pi_0(X)$ for a topological space X So I've been asked to show that there is a bijection between $\pi_0(X)$ and $[S^0,X]$ for a topological space X but the definition given in my notes is:  $\pi_n(X) = [S^n,X]$, so I'm finding this a bit confusing. The question is part b of the below image: 

 A: Let $S^0 = \{0, 1 \}$ and denote the basepoint of $X$ by $x_0$.
By definition, $[S^0, X]$ is the set of equivalence classes of maps from $S^0 $ to $X$ sending $0$ to the basepoint $x_0$ modulo homotopy.
So let's ask ourselves: how can we classify such maps up to homotopy?
First of all, since all of our maps send $0$ to $x_0$, our maps are uniquely specified by where they send the point $1$.
So suppose you have two maps $f_1, f_2: S^0 \to X$, defined by
$$ f_1 : 0 \mapsto x_0, \ \ 1 \mapsto x_1,$$
$$ f_2 : 0 \mapsto x_0, \ \ 1 \mapsto x_2.$$
These maps are homotopic iff there exists a continuous function $F: S^0 \times I \to X$ such that
$$ F(t , 0) = f_1(t), \ \  F(t , 1) = f_2(t),$$
for $t \in S^0$.
If such a continuous function $F$ exists, then $s \mapsto F(1, s)$ is a continuous path between $x_1$ and $x_2$, so $x_1$ and $x_2$ are in the same path component.
Conversely, if $x_1$ and $x_2$ are in the same path component, then there exists a continuous path $\gamma : I \to X$ with $\gamma(0) = x_1$ and $\gamma(1) = x_2$, so we can define such a function $F$ by
$$ F(0,s) = x_0, \ \ F(1,s) = \gamma (s).$$
The conclusion is that $[S^0, X]$ can be identified with the set of path components of $X$, which is precisely $\pi_0(X)$, by definition.
