Proof that $U(n)$ is connected
I'm trying to prove that $U(n)= \{ X\in Mat_n(\mathbb{C})|X^T\bar{X}=I\}$ is connected, but most of the proof comes down to proving that $SU(n)= \{ X\in Mat_n(\mathbb{C})|X^T\bar{X}=I $ and $ detX=1\}$ is connected. This is what I have but I'm not sure whether it's valid:
Consider the homomorphism $det:U(n) \rightarrow U(1) \subset \mathbb{C}^*$. We have that the kernel of this homomorphism is $SU(n)$. Thus $U(n)/SU(n) = U(1)$. Fibres will be left cosets $ASU(n)$, where $A\in U(n)$. My aim is to use the following theorem:
Theorem: Let $G$ be a Lie group and $H\subset G$ its Lie subgroup. Assume that H is connected. Then G is connected $\iff G/H$ is connected.
I proceed via induction on $n$. When $n=1$: $SU(1)={1}$ is just one element, thus is connected. Assume $SU(2),...,SU(n-1)$ are connected.
The group $SU(n)$ acts on the set $S^{2n-1}$. Let us show that this action is transitive. Take $0\not=\xi_1 \in \mathbb{C}.$ We can add $\xi_2,...,\xi_n$ to get a basis of $S^{2n-1}$. We can take another $0\not= \xi_1' \in \mathbb{C}$ and add $\xi_2',...,\xi_n'$ to get another basis of $S^{2n-1}$. There exists $F\in GL(n,\mathbb{C})$ such that $F(\xi_i)=\xi_i'$. If $detF=\lambda \not= 1,$ then change $\xi_n = \frac{1}{\lambda}$. Then we have $F\in SU(n)$. Therefore the action of $SU(n)$ on $S^{2n-1}$ is transitive.
The stabiliser subgroup of $\xi_1$, that is $SU(n)_{\xi_1}=\{F\in SU(n) | F(\xi_1)=\xi_1 \}$, contains $F\in SU(n)$ with matrix of the form:
$A= \begin{bmatrix}1 & 0 &...& 0\\0 & a_{1,1} & ... & a_{1,n-1} \\ ... & ... & ... & ... \\ 0 & a_{n,1} & ... & a_{n-1,n-1} \end{bmatrix} $
Let the (n-1)x(n-1) submatrix in the bottom right be called $A_{n-1}$. We have $detA=detA_{n-1}=1 \implies A_{n-1} \in SU(n-1)$. We have by the inductive assumption that $SU(n-1)$ is connected, thus we can connect $A_{n-1}$ to the identity and therefore can connect $A$ to the identity. Thus $SU(n)_{\xi_1}$ is connected.
Now I apply the following theorem:
Theorem: Assume a Lie group G acts transitively on a manifold M. Then $M=G/G_m$ for a fixed $m\in M$.
So we have that $SU(n)/SU(n)_{\xi_1}=S^{2n-1}$. We know that $S^{2n-1}$ is connected since it is just the (2n-1)-sphere, and we have just seen that $SU(n)_{\xi_1}$ is connected. Therefore, by the theorem above, it follows that $SU(n)$ is connected.
It then follows from this that, since $U(n)/SU(n)=U(1)$, and we just showed that $SU(n)$ is connected and we know $U(1)=S^1$ is connected, $U(n)$ must be connected.
My apologies if that was a bit long winded, I sincerely appreciate any comments you have on the validity of this proof.
A unitary matrix $U$ is diagonalizable in an orthonormal basis, and its spectrum consists of modulus one complex numbers. So there exists $V$ unitary such that $$ A=V\mbox{diagonal}\{e^{i\theta_1},\ldots,e^{i\theta_n}\}V^*. $$ If $\det A=\exp(i(\theta_1+\ldots+\theta_n))=1$, we can choose representatives for the $\theta_j$'s modulo $2\pi$ such that $\theta_1+\ldots+\theta_n=0$. Now set
$$ A_t:=V\mbox{diagonal}\{e^{it\theta_1},\ldots,e^{it\theta_n}\}V^*. $$
This formula defines a continuous path connecting $A$ and $I_n$ within $SU(n)$. It follows that $SU(n)$ is pathwise connected, hence connected. Of course, this argument proves directly that $U(n)$ is connected.
Generalization: thanks to the $L^\infty$ functional calculus, we can prove the unitary group of a von Neumann algebra is pathwise connected. Unlike, in general, the unitary group of a $C^*$-algebra.
Take $u$ unitary in a von Neumann algebra $M$. Since $u$ is normal, we can define $h:=\frac{1}{i}\log u$ in $M$, where $\log $ is the principal branch of the complex logarithm, including $\log(r)=\log(|r|)+i\pi$ for $r\in(-\infty,0)$. This is in particular $L^\infty$ on the spectrum of $U$. And it follows from the properties of the $L^\infty$ functional calculus that $h$ is hermitian with $e^{ih}=u$. Then $u_t:=e^{ith}$ defines a continuous path connecting $1$ and $u$ within the unitary group of $M$.