Homotopy classes of maps $\mathbb{R}P^n \to S^n$ Maybe a silly question but I struggle to find the homotopy classes of maps from n-dimensional real projective space to n-sphere $\mathbb{R}P^n \to S^n$, $n \ge 1$. The case $n = 1$ is easy, I especially interested in case $n = 2$. Many thanks for your help.
 A: It is not a silly question, but it has a somewhat simple answer. The maps are determined up to homotopy by degree. When $n$ is odd, these manifolds may be oriented and the degree is an integer so there are infinitely many homotopy classes. When $n$ is even, these manifolds may not be oriented and the degree is an integer mod $2$. There are exactly two homotopy classes.

What you need to know is that there is a CW-complex $X_n$ with the following properties:
(1) We have $\pi_n(X_n) = \Bbb Z$, while $\pi_i(X_i) = 0$ for all $i \ne n$;
(2) The $(n+1)$-skeleton $X_n^{(n+1)}$ is the $n$-sphere $S^n$. Equivalently, we may assume $X_n$ has exactly one $0$-cell and one $n$-cell and no $i$-cells with $0 < i < n$ or $i=n+1$.
(3) There is a canonical (natural) bijection $H^n(K;\Bbb Z) \cong [K, X_n]$, where $K$ is a CW-complex and $[-,-]$ indicates the set of homotopy classes of maps.
A space $X_n$ satisfying Property (1) is called an Eilenberg MacLane space $K(\Bbb Z, n)$. Property (3) is a theorem about Eilenberg MacLane spaces whose proof you can find in, say, Chapter 4 of Hatcher's textbook. Property (2) follows from an explicit construction: since $\pi_n(S^n) = \Bbb Z$ and $\pi_i(S^n) = 0$ for $i < n$, you can simply attach cells of dimension $d \ge n+2$ to kill off the higher homotopy groups. (To guarantee that you're merely killing off homotopy groups and not adding new lower-degree homotopy classes in this process, you have to use an excision theorem for homotopy groups.)
From here you need to know the cellular approximation theorem. This says that if you have a CW-complex $A$ (or even a CW-pair $(A,B)$) and another CW complex $X$, the map $f: A \to X$ is homotopic to a cellular map (one which sends $d$-cells into the $d$-skeleton); if $f$ is cellular on $B$ already, the homotopy to a cellular map may be chosen to be fixed on $d$.
This implies that $[A, X^{(\dim A)}] \to [A, X]$ is surjective; applying this to the CW-pair $(I \times A, \partial A)$ we also see that $[A, X^{(\dim A + 1)}] \to [A, X]$ is a bijection.
Now $\Bbb{RP}^n$ has dimension $n$, so $$H^n(\Bbb{RP}^n;\Bbb Z) = [\Bbb{RP}^n, X_n] = [\Bbb{RP}^n, X_n^{(n+1)}] = [\Bbb{RP}^n, S^n].$$
When $n$ is odd, this cohomology group is $\Bbb Z$: the manifold $\Bbb{RP}^n$ may be oriented, and the homotopy class of map is determined by degree.
When $n$ is even, the cohomology group is $\Bbb Z/2$: the manifold $\Bbb{RP}^n$ is non-orientable, and the homotopy class of map is determined by unoriented (mod 2) degree.

There is also a nice proof in terms of framed cobordism of 0-manifolds in $\Bbb{RP}^n$.
