# all functions from the unit interval into a path connected space homotopic?

I'm trying to give myself a quick introductory overview of homotopy theory, and I've run into this problem that I can't reconcile with my understanding of the fundamental group.

For spaces X and Y, let [X,Y] denote the set of homotopy classes of maps of X into Y. Let I=[0,1]. Show that if Y is path connected, [I,Y] has a single element.

The problem is from Munkres, and I've seen the solution online, and that solution seems reasonable. However, there is what seems to me to be a very simple counter-example, and I wonder what I'm misunderstanding about the problem that makes it not actually a counterexample:

Let Y=R^2 with the origin deleted. Let f:I->Y be such the constant function f(x)=(0,1). Let h(x)=(cos(2*pi*x), sin(2*pi*x)).

Then h is a loop around the origin, and it can't be homotopic to f. Right? Isn't one of the primary motivations of formulating the fundamental group that a space is simply connected iff the fundamental group at every point is trivial?

• A conceptual way to think about these things is that $[X, Y]$ only depends on the homotopy type of $X$ and $Y$, and $I$ is homotopy equivalent to a point (contractible). Commented Sep 5, 2016 at 21:49

• A homotopy between two paths, both of which start at $A$ and end at $B$
• A homotopy between paths starting at $A$ and ending at $B$