TITLE: Why is the dual of a torus the same as its fundamental group?
QUESTION [13 upvotes]: The set of continuous homomorphisms from a torus ${\mathbb T}^n = ({\mathbb R}/{\mathbb Z})^n \to {\mathbb R}/{\mathbb Z}$ can be identified with ${\mathbb Z}^n$ if we assign to each $k = (k_1, \ldots k_n) \in {\mathbb Z}^n$ the character $x \mapsto k \cdot x$.
The fundamental group of homotopy classes of loops ${\mathbb R}/{\mathbb Z} \to {\mathbb T}$ can also be identified with ${\mathbb Z}^n$ because each equivalence class (with base point at the origin) can be represented by $x \mapsto (k_1 x, k_2 x, \ldots, k_n x)$ for some $k \in {\mathbb Z}^n$.
My question is basically how much of a coincidence this isomorphism is.  For one thing, it can't be too natural because the fundamental group pushes forward under a map, whereas the character group pulls back.  So the natural question should be whether there is a natural relationship at the level of the first cohomology group instead of the fundamental group.
Of course, totally disconnected groups have interesting dual groups even though their cohomology is uninteresting as far as I know.  And ${\mathbb R}^n$, being isomorphic to its dual but contractible, does not seem to exhibit a similar relationship.  
But for a Lie group, say, I would like to know if there's a natural relationship between its representation theory (e.g. irreducible representations) on the one hand and its topology (e.g. cohomology) on the other hand.  It might be no deeper than "well, the cohomology groups are representations".

REPLY [5 votes]: This is just a minor elaboration on David Ben-Zvi's answer.  You can see the duality between the fundamental group of $T$ and the character lattice by composing based loops $\mathbb{R}/\mathbb{Z} \to T$ with characters $T \to \mathbb{R}/\mathbb{Z}$.  You end up with based loops in $\mathbb{R}/\mathbb{Z}$, whose homotopy classes are completely determined by an integer invariant, namely the degree.  You can view the degree algebraically as the induced homomorphism on $\pi_1(\mathbb{R}/\mathbb{Z},0) \cong H_1(\mathbb{R}/\mathbb{Z}, \mathbb{Z})$, or geometrically as the winding number if you choose an isomorphism with an oriented circle in the plane.  This yields a perfect pairing between $\pi_1(T,0)$ and $X^*(T)$.
In the nonabelian situation, one can see that the fundamental group of a connected topological group doesn't determine that much about the representation theory.  There are plenty of simply connected groups with fairly complicated representation theory.  However, the K-theory of the classifying space can say a lot about representations.
Regarding the title of the question, one should be careful about calling two groups "the same", even if they are isomorphic.