[proofplan]
We identify $SO(2)$ with the circle and compute its fundamental group from the standard universal covering map $\mathbb R\to S^1$. For $SO(3)$, we use the double covering $SU(2)\to SO(3)$ and the explicit identification $SU(2)\cong S^3$, so the fundamental group of $SO(3)$ is the deck group of this two-sheeted universal cover. We prove that all $SU(n)$ with $n\geq 2$ are simply connected by induction from the first-column fibration $SU(n-1)\to SU(n)\to S^{2n-1}$ and the long exact sequence of homotopy groups. Then the determinant fibration $SU(n)\to U(n)\to U(1)$ gives the computation for $U(n)$, and [polar decomposition](/theorems/3074) deformation retracts $SL(2,\mathbb R)$ onto $SO(2)$.
[/proofplan]
[step:Identify $SO(2)$ with the circle and compute its fundamental group]
Define
\begin{align*}
S^1 := \{(x,y)\in\mathbb R^2 : x^2+y^2=1\}.
\end{align*}
Then define
\begin{align*}
\rho:S^1&\to SO(2)
\end{align*}
\begin{align*}
(\cos \theta,\sin \theta)&\mapsto
\begin{pmatrix}
\cos \theta&-\sin \theta
\end{align*}
\begin{align*}
\sin \theta&\cos \theta
\end{pmatrix},
\end{align*}
This is a well-defined continuous group isomorphism, with continuous inverse sending a matrix
\begin{align*}
\begin{pmatrix}
a&-b
\end{align*}
\begin{align*}
b&a
\end{pmatrix}
\end{align*}
to $(a,b)$. Hence $\rho$ is a homeomorphism.
The map
\begin{align*}
p:\mathbb R&\to S^1
\end{align*}
\begin{align*}
t&\mapsto (\cos t,\sin t)
\end{align*}
is the standard universal covering map of $S^1$, and its deck transformation group is generated by $t\mapsto t+2\pi$. Therefore
\begin{align*}
\pi_1(S^1,(1,0))\cong \mathbb Z.
\end{align*}
Transporting this isomorphism through the homeomorphism $\rho$ gives
\begin{align*}
\pi_1(SO(2),I_2)\cong \mathbb Z.
\end{align*}
[/step]
[step:Use the double cover from $SU(2)$ to $SO(3)$ to compute $\pi_1(SO(3))$]
Every element of $SU(2)$ has a unique form
\begin{align*}
\begin{pmatrix}
\alpha&-\overline{\beta}
\end{align*}
\begin{align*}
\beta&\overline{\alpha}
\end{pmatrix}
\end{align*}
with $\alpha,\beta\in\mathbb C$ satisfying $|\alpha|^2+|\beta|^2=1$. Let
\begin{align*}
S^3 := \{(x_1,x_2,x_3,x_4)\in\mathbb R^4 : x_1^2+x_2^2+x_3^2+x_4^2=1\}.
\end{align*}
Thus the map sending such a matrix to $(\operatorname{Re}\alpha,\operatorname{Im}\alpha,\operatorname{Re}\beta,\operatorname{Im}\beta)$ is a homeomorphism $SU(2)\cong S^3$. Since $S^3$ is simply connected, $SU(2)$ is simply connected.
By [citetheorem:8775], there is a surjective smooth Lie [group homomorphism](/page/Group%20Homomorphism)
\begin{align*}
\Phi:SU(2)\to SO(3)
\end{align*}
with kernel $\{I_2,-I_2\}$. Since $\Phi$ is a two-sheeted covering homomorphism and the source $SU(2)$ is simply connected, $\Phi$ is the universal covering map of $SO(3)$. The fundamental group of a [connected space](/page/Connected%20Space) is naturally isomorphic to the deck transformation group of its universal cover. Here the deck transformation group is the kernel $\{I_2,-I_2\}$, acting on $SU(2)$ by multiplication, and this group is isomorphic to $\mathbb Z/2\mathbb Z$. Therefore
\begin{align*}
\pi_1(SO(3),I_3)\cong \mathbb Z/2\mathbb Z.
\end{align*}
[guided]
The point of using $SU(2)$ is that it is topologically much easier than $SO(3)$. We first identify $SU(2)$ explicitly. If
\begin{align*}
U=
\begin{pmatrix}
\alpha&\gamma
\end{align*}
\begin{align*}
\beta&\delta
\end{pmatrix}
\in SU(2),
\end{align*}
then the condition $U^*U=I_2$ says that the two columns are orthonormal in $\mathbb C^2$, and the condition $\det U=1$ forces the second column to be $(-\overline{\beta},\overline{\alpha})^\top$. Hence every element of $SU(2)$ has the form
\begin{align*}
\begin{pmatrix}
\alpha&-\overline{\beta}
\end{align*}
\begin{align*}
\beta&\overline{\alpha}
\end{pmatrix}
\end{align*}
with $|\alpha|^2+|\beta|^2=1$. Conversely, every such matrix is unitary and has determinant $|\alpha|^2+|\beta|^2=1$. Therefore the assignment
\begin{align*}
\begin{pmatrix}
\alpha&-\overline{\beta}
\end{align*}
\begin{align*}
\beta&\overline{\alpha}
\end{pmatrix}
&\mapsto
(\operatorname{Re}\alpha,\operatorname{Im}\alpha,\operatorname{Re}\beta,\operatorname{Im}\beta)
\end{align*}
is a homeomorphism $SU(2)\cong S^3$. Since $S^3$ is simply connected, $SU(2)$ is simply connected.
Now apply [citetheorem:8775]. It gives a surjective smooth Lie group homomorphism
\begin{align*}
\Phi:SU(2)\to SO(3)
\end{align*}
whose kernel is exactly $\{I_2,-I_2\}$. This map is a two-sheeted covering map. Because its source $SU(2)$ is simply connected, it is the universal covering map of $SO(3)$. For a universal covering map, the fundamental group of the base is naturally identified with the group of deck transformations of the cover. In this case the deck transformations are precisely multiplication by elements of the kernel:
\begin{align*}
U&\mapsto U,
\end{align*}
\begin{align*}
U&\mapsto -U.
\end{align*}
Thus the deck group has two elements and is isomorphic to $\mathbb Z/2\mathbb Z$. Consequently
\begin{align*}
\pi_1(SO(3),I_3)\cong \mathbb Z/2\mathbb Z.
\end{align*}
[/guided]
[/step]
[step:Prove by induction that $SU(n)$ is simply connected for $n\geq 2$]
The base case $n=2$ was established above from the homeomorphism $SU(2)\cong S^3$.
Let $n\geq 3$, and suppose $SU(n-1)$ is simply connected. Let
\begin{align*}
S^{2n-1} := \{v\in\mathbb C^n : |v|=1\}
\end{align*}
be the unit sphere in $\mathbb C^n$. Define the first-column map
\begin{align*}
c_n:SU(n)&\to S^{2n-1}
\end{align*}
\begin{align*}
A&\mapsto Ae_1,
\end{align*}
where $e_1=(1,0,\dots,0)\in\mathbb C^n$. This is a locally trivial fibration. Its fibre over $e_1$ consists of the matrices
\begin{align*}
\begin{pmatrix}
1&0
\end{align*}
\begin{align*}
0&B
\end{pmatrix}
\end{align*}
with $B\in SU(n-1)$, so the fibre is naturally isomorphic to $SU(n-1)$.
The long exact homotopy sequence for this fibration contains
\begin{align*}
\pi_2(S^{2n-1})\to \pi_1(SU(n-1))\to \pi_1(SU(n))\to \pi_1(S^{2n-1}).
\end{align*}
Since $2n-1\geq 5$, the sphere $S^{2n-1}$ is simply connected and has $\pi_2(S^{2n-1})=0$. By the induction hypothesis, $\pi_1(SU(n-1))=0$. Exactness therefore gives
\begin{align*}
\pi_1(SU(n))=0.
\end{align*}
By induction, $SU(n)$ is simply connected for every $n\geq 2$.
[/step]
[step:Apply the determinant fibration to compute $\pi_1(U(n))$]
Let $n\geq 1$. The determinant map
\begin{align*}
\det:U(n)&\to U(1)
\end{align*}
\begin{align*}
A&\mapsto \det A
\end{align*}
is a continuous surjective Lie group homomorphism. Its kernel is $SU(n)$, so it gives a locally trivial fibration
\begin{align*}
SU(n)\hookrightarrow U(n)\xrightarrow{\det}U(1).
\end{align*}
For $n=1$, this says $U(1)=S^1$, so
\begin{align*}
\pi_1(U(1),1)\cong \mathbb Z.
\end{align*}
Now let $n\geq 2$. The long exact homotopy sequence contains
\begin{align*}
\pi_1(SU(n))\to \pi_1(U(n))\to \pi_1(U(1))\to \pi_0(SU(n)).
\end{align*}
The group $SU(n)$ is simply connected by the previous step, hence $\pi_1(SU(n))=0$ and $\pi_0(SU(n))=0$. Exactness implies that the induced map
\begin{align*}
\det_*:\pi_1(U(n),I_n)\to \pi_1(U(1),1)
\end{align*}
is an isomorphism. Since $U(1)\cong S^1$, we conclude
\begin{align*}
\pi_1(U(n),I_n)\cong \mathbb Z.
\end{align*}
[/step]
[step:Use polar decomposition to retract $SL(2,\mathbb R)$ onto $SO(2)$]
For $SL(1,\mathbb R)$, the determinant-one condition gives
\begin{align*}
SL(1,\mathbb R)=\{1\},
\end{align*}
so $SL(1,\mathbb R)$ is a singleton and is simply connected.
Now let $A\in SL(2,\mathbb R)$. By polar decomposition there are unique matrices $Q\in SO(2)$ and $P$ symmetric positive definite with $\det P=1$ such that
\begin{align*}
A=QP.
\end{align*}
Define
\begin{align*}
H:SL(2,\mathbb R)\times[0,1]&\to SL(2,\mathbb R)
\end{align*}
\begin{align*}
(A,t)&\mapsto QP^{1-t},
\end{align*}
where $A=QP$ is the polar decomposition and $P^{1-t}$ is defined by the positive-definite functional calculus. Since $P$ is positive definite with determinant $1$, each $P^{1-t}$ is positive definite and satisfies $\det(P^{1-t})=1$. Hence $H(A,t)\in SL(2,\mathbb R)$ for all $A$ and $t$.
At $t=0$, $H(A,0)=QP=A$. At $t=1$, $H(A,1)=Q\in SO(2)$. If $A\in SO(2)$, then its polar decomposition is $A=A I_2$, so $H(A,t)=A$ for every $t\in[0,1]$. Thus $H$ is a deformation retraction of $SL(2,\mathbb R)$ onto $SO(2)$. Therefore the inclusion $SO(2)\hookrightarrow SL(2,\mathbb R)$ induces an isomorphism on fundamental groups, and from the first step
\begin{align*}
\pi_1(SL(2,\mathbb R),I_2)\cong \pi_1(SO(2),I_2)\cong \mathbb Z.
\end{align*}
[/step]
[step:Collect the computed fundamental groups]
Combining the preceding steps gives
\begin{align*}
\pi_1(SO(2),I_2)\cong \mathbb Z,
\end{align*}
\begin{align*}
\pi_1(SO(3),I_3)\cong \mathbb Z/2\mathbb Z,
\end{align*}
\begin{align*}
\pi_1(U(n),I_n)\cong \mathbb Z
\end{align*}
for every $n\geq 1$,
\begin{align*}
\pi_1(SU(n),I_n)=0
\end{align*}
for every $n\geq 2$, and
\begin{align*}
SL(1,\mathbb R)=\{1\},\qquad \pi_1(SL(2,\mathbb R),I_2)\cong \mathbb Z.
\end{align*}
This is exactly the claimed list of fundamental groups.
[/step]