I find a statement that the set of pairs of commuting elements in a group G is bijective to the set of homotopy classes of maps from torus to BG, the classifying space in the paper Elliptic cohomology I was wondering whether there is a simple proof or some other references for this statement.
closed as offtopic by Franz Lemmermeyer, Wolfgang, abx, john mangual, Ryan Budney Sep 13 '16 at 20:16
This question appears to be offtopic. The users who voted to close gave this specific reason:
 "This question does not appear to be about research level mathematics within the scope defined in the help center." – Franz Lemmermeyer, Wolfgang, abx, john mangual, Ryan Budney

2$\begingroup$ This is true only if $G$ is discrete, see math.stackexchange.com/questions/36488/… and use that $G\sim \Omega BG$, so $\pi_1(BG)=\pi_0(G),\pi_2(BG)=\pi_1(G)$. $\endgroup$ – SashaP Sep 13 '16 at 6:29

$\begingroup$ Note that the set of pairs of commuting elements in $G$ is in bijections with $\text{Hom}(\mathbb{Z}^2,G)$. $\endgroup$ – Uri Bader Sep 13 '16 at 12:48

$\begingroup$ Could you fix your link? Even after inserting a colon after the http, Numdam said that the document wasn't found. $\endgroup$ – S. Carnahan♦ Sep 13 '16 at 13:08

$\begingroup$ The claim is slightly incorrect as stated; either you should take pointed homotopy or you should quotient by conjugation by $G$. $\endgroup$ – Qiaochu Yuan Sep 13 '16 at 16:27
This is not much more than an extended version of the two coments above.
For discrete groups $\Gamma, G$ it is true that $${\pi_1}_{\ast}\colon [B\Gamma,BG] \to \text{Hom}(\Gamma,G)$$ is a bijection, see e.g. the first chapter of MosherTangora.
In particular, for $\Gamma = \mathbb Z^2$ we get $$[T^2,BG] \cong \text{Hom}(\mathbb Z^2,G) = \{g,h \in G : gh = hg\}.$$ For $G$ nondiscrete however, this fails to be true; take e.g. $G = S^1$ so that $BG = \mathbb CP^{\infty}$. Then $$[T^2,BS^1] = [T^2,S^2] = \mathbb Z,$$ but the space of commuting elements in $G$ is $S^1 \times S^1 = T^2$.