Fundamental group of the special orthogonal group SO(n) Question: What is the fundamental group of the special orthogonal group $SO(n)$, $n>2$? 
Clarification: The answer usually given is: $\mathbb{Z}_2$. But I would like to see a proof of that and an isomorphism $\pi_1(SO(n),E_n) \to \mathbb{Z}_2$ that is as explicit as possible. I require a neat criterion to check, if a path in $SO(n)$ is null-homotopic or not.
Idea 1: Maybe it is helpful to think of $SO(n)$ as embedded in $SO(n+1)$ via $A \mapsto \begin{pmatrix} A & 0 \\ 0 & 1 \end{pmatrix}$. The kernel of the surjective map $SO(n+1) \to \mathbb{S}^{n} \subset \mathbb{R}^{n+1}$, $B \mapsto B e_{n+1}$, is then exactly $SO(n)$. Therefore $\mathbb{S}^n \cong SO(n+1)/SO(n)$. The fundamental group of $\mathbb{S}^n$ is trivial. If one knew how the fundamental group of quotients $Y = X / A$ looks like, this could be helpful.
Idea 2: The map $SO(n+1) \to \mathbb{S}^n$ defined above can also be though of as a principal $SO(n)$-bundle. There is an exact sequence of homotopy groups for those bundles, which might provide the result. But the descriptions of the maps in this sequence I found were quite vague. 
 A: I think it's helpful to have a way of "seeing" that a $2\pi$ rotation $A$ (intended as a 1-parameter group of rotations $A(t), t\in[0,1]$ that starts and ends at the identity $e$) about an axis is homotopic to its inverse. (In other words, that $A^2=e$ as elements of the fundamental group.) If $A$ is the clockwise rotation around the $x$ axis, we want a 1-parameter group of rotations that starts at $A$ and ends at $A^{-1}$, which is the counterclockwise rotation around the same axis. 
So, let $C\subset S^3$ be the half circle that is the intersection of $S^3$ with the upper half of the $xz$ plane, and let $v(s), s\in [0,1]$, be a parametrization of $C$ starting at $(1,0,0)$ and ending at $(-1,0,0)$. Let $A_s$ be the clockwise $2\pi$ rotation around the straight line that goes through $v(s)$ and the origin. Then clearly $A_0 = A$, $A_1 = A^{-1}$, and $A_s(t)$ is the desired homotopy. 
A: Many of you have mentioned the long exact sequence
$
\pi_2(S^n)\to\pi_1(SO(n))\to\pi_1(SO(n+1))\to\pi_1(S^n),
$
which can be used to show $\pi_1(SO(n))=\pi_1(SO(3))=\pi_1(\mathbb{RP}^3)$, which is $\mathbb{Z}/2$, quite explicitly.
Now the question becomes: how to see the isomorphism $\pi_1(SO(n))\simeq\pi_1(SO(n+1))$ explicity?
Since the map from left to right is simply induced by the inclusion, the nontrivial part is to find its (explicit) inverse.
We can visualize $SO(n+1)$ by orthonormal frame in $\mathbb{R}^{n+1}$ with positive orientation. Suppose we have a loop of frames $(e_1(t),\dots,e_{n+1}(t))$. We can view it as
$(e_1(t),\dots,e_n(t))\in T_{e_{n+1}(t)}S^n\subset TS^n$.
Assume $q\in S^n$ is not on the loop $e_{n+1}(t)$. (If $e_{n+1}(t)$ happens to be a space-filling curve, you can homotopy it slightly so that it is not.) Let $p=-q$. Then there is a unique geodesic from $p$ to $e_{n+1}(t)$, which varies continuously with respect to $t$.
Now parallel transport the frame
$(e_1(t),\dots,e_n(t))\in T_{e_{n+1}(t)}S^n$
back along the geodesic to a frame
$(e_1'(t),\dots,e_n'(t))\in T_pS^n$,
which can then be viewed as a loop of orthonormal frames in $\mathbb{R}^n$ with positive orientation. This way we get a loop in $SO(n)$. Continue until $n=3$.
A: You can use the exact sequence of homotopy groups you mention (without knowing the maps) to get the result once you know $\pi_1(SO(3))$.  For that you can use the fact that SU(2) double covers SO(3) and SU(2) is simply connected (being diffeomorphic to the 3 sphere). 
EDITED to address Meneldur's comment:
Sorry I glossed over the part where you mentioned you wanted an explicit isomorphism.  The fibration
$$
SO(n) \to SO(n+1) \to S^n
$$
gives
$$
\pi_2(S^n) \to \pi_1(SO(n)) \to \pi_1(SO(n+1)) \to \pi_1(S^n)
$$
is exact.  Now for $n \ge 3$, $\pi_2(S^n)$ and $\pi_1(S^n)$ are both trivial.  Therefore $\pi_1(SO(n)) \simeq \pi_1(SO(n+1))$ and this isomorphism is via the inclusion $SO(n) \to SO(n+1)$.  So once you have the nontrivial loop generating $\pi_1(SO(3))$ you can just include that in higher dimensions to get the generator for all the other ones. 
To get such a loop for $SO(3)$, you need to find a path in $SU(2)$ connecting 1 to -1 and then project that to $SO(3)$.  Thinking of $SU(2)$ as unit quaternions, such a path is $q:t \mapsto \cos(\pi t) + i\sin(\pi t)$.  Now thinking of $\mathbb R^3$ as purely imaginary quaternions, $q(t)$ corresponds to the element in $SO(3)$ sending $p \mapsto q(t)p\bar q(t)$.  Now you can write out this map in matrix form to see what the path looks like in terms of $SO(3)$ as 3x3 matrices.  Simply including this path using the inclusion into $SO(n)$ for higher $n$ will, by the LES, give us the non-trivial element of $\pi_1$ for higher $n$.
Unfortunately, I am not sure how to determine if a given loop is nullhomotopic.
A: I've never really thought much about it beyond using the LES in homotopy associated to the fibration $$SO(n) \to SO(n+1) \to S^n$$
But a bit of googling leads to the following description, which is perhaps helpful. (Source - pp. 263 )

For $n \ge 3 , \pi_1(SO(n)) = \mathbb{Z}/2$. The generator of the group $\pi_1(SO(n))$ is the path consisting of all rotations about a fixed axis

Proof:

The LES in homotopy gives that $\pi_1(SO(n)) \simeq \pi_1(SO(n+1))$, and since $\pi_1(SO(3)) \simeq \pi_1(\mathbb{R} P^3) \simeq \mathbb{Z}/2$ we have that, for $n \ge 3, \pi_1(SO(n)) = \mathbb{Z}/2$. 
  Let us represent $\mathbb{R} P^3$ as the disk $D^3$ with the boundary antipodes identified. The homeomoprhism $SO(3) \simeq \mathbb{R} P^3$ takes the rotations about a fixed axis to some diameter of the disk. Each path-diameter of $D^3$ corresponds to a non-zero element of the group $\pi_1(\mathbb{R} P^3)$, because the lifting of this path under the covering $S^3 \to \mathbb{R} P^3$ is nonclosed. The embedding $SO(n) \to SO(n+1)$ maps rotations about a fixed axis to rotations aboout a fixed axis, and it takes a generator of the fundamental group to the genreator of the fundamental group. 

A: Using LES in homotopy it's easy to see the inclusion $SO(2) \to SO(3)$ induces a surjection $\pi_1(SO(2)) \to \pi_1(SO(3))$ hence also a surjection $\pi_1(SO(2)) \to \pi_1(SO(n))$. Since we have known that $\pi_1(SO(n))=\mathbb{Z}_2$, and the path class of $f(t)=\begin{pmatrix} \cos 2\pi t & \sin 2\pi t \\ -\sin 2\pi t & \cos 2\pi t \end{pmatrix}$ is a generator of $\pi_1(SO(2))$, and this must be mapped to a generator of $\pi_1(SO(n))$, so a generator of $\pi_1(SO(n))$ is just the path class of the map 
$$g(t)=\begin{pmatrix} \cos 2\pi t & \sin 2\pi t & 0 \\ -\sin 2\pi t & \cos 2\pi t & 0\\ 0 & 0 & I_{n-2} \end{pmatrix}.$$
