How to show that the general orthogonal group $O(n,1)$ has four components? Define a bilinear form on $\mathbb R^{n+1}$ by $(x,y)=\sum\limits_{i=1}^n x_iy_i-x_{n+1}y_{n+1}$, the general orthogonal group $O(n,1)$ is defined to be $\left\{B\in GL(n+1,\mathbb R)\mid(Bx,By)=(x,y),\forall x,y\in\mathbb R^{n+1}\right\}$, where $(x,y)=\langle x,gy\rangle,\, g=\operatorname{diag}\{1,\cdots,1,-1\}$ and $\langle\cdot,\cdot\rangle$ denotes the usual Euclidean inner product. Thus $B\in O(n,1)\Leftrightarrow B^tgB=g$. This is shown as a result in Brian C. Hall's "Lie Groups, Lie Algebras and Representations", but I hope to get a proof that $O(n,1)$ has four components.
 A: Denote the standard basis of $\mathbb R^{n+1}$ by $\{e_1,\ldots,e_{n+1}\}$. $O(n,1)$ has four connected components:

*

*$\{B\in O(n,\mathbb R):\det(B)=1,\ (Be_{n+1},e_{n+1})>0\}$,

*$\{B\in O(n,\mathbb R):\det(B)=1,\ (Be_{n+1},e_{n+1})<0\}$,

*$\{B\in O(n,\mathbb R):\det(B)=-1,\ (Be_{n+1},e_{n+1})>0\}$,

*$\{B\in O(n,\mathbb R):\det(B)=-1,\ (Be_{n+1},e_{n+1})<0\}$.

In fact, each member of $O(n,1)$ can be expressed as
\begin{align}
B&=\begin{bmatrix}Q\\ &1\end{bmatrix}
\begin{bmatrix}
I_n+\left(\sqrt{1+c^2}-1\right)uu^T&cu\\ cu^T&\sqrt{1+c^2}
\end{bmatrix}
\begin{bmatrix}I_n\\ &t\end{bmatrix}\\
&=\begin{bmatrix}
Q\left[I_n+\left(\sqrt{1+c^2}-1\right)uu^T\right]&tcQu\\ cu^T&t\sqrt{1+c^2}
\end{bmatrix}\tag{0}
\end{align}
where $t\in\{1,-1\},\,Q\in O(n),\,c\in\mathbb R$ and $u$ is a unit vector in $\mathbb R^n$. The sign of $(Be_{n+1},e_{n+1})$ is $-t$ while $\det(B)=t\det(Q)$. With this characterisation of $B$, the path-connectedness of each of the four aforementioned sets is evident.
To prove that $B$ can be written in the above form, let us partition $B$ as $\pmatrix{X&v\\ w^t&\lambda}$, where $\lambda$ is a scalar and $X,v,w$ are matrices or vectors of appropriate sizes. The equation $B^tgB=g$ can then be rewritten as
\begin{align}
&X^tX=I+ww^t,\tag{1}\\
&X^tv=\lambda w,\tag{2}\\
&\lambda^2=1+\|v\|^2.\tag{3}
\end{align}
By $(3)$, $\lambda$ is never zero. Moreover, the RHS of $(1)$ is positive definite. Therefore $X$ is nonsingular and $(2),(3)$ implies that $v$ and $w$ are either both zero or both nonzero.
If $v=w=0$, clearly $X$ is a real orthogonal matrix and $\lambda=\pm1$. Therefore $B$ takes the form of $(0)$. Now suppose $v,w\ne0$. The positive definite square root of $I+ww^t$ is $I+\left(\sqrt{\|w\|^2+1}-1\right)\frac{ww^t}{\|w\|^2}$. Therefore $(1)$ is equivalent to
$$
X=Q\left[I+\left(\sqrt{\|w\|^2+1}-1\right)\frac{ww^t}{\|w\|^2}\right]\tag{4}
$$
for some real orthogonal matrix $Q$. Substitute this into $(2)$, we obtain
$$
\left[I+\left(\sqrt{\|w\|^2+1}-1\right)\frac{ww^t}{\|w\|^2}\right]Q^tv=\lambda w\tag{5}
$$
and hence
$$
Q^tv=tw\tag{6}
$$
for some nonzero scalar $t$. Substitute this back into $(5)$, we obtain $(t\sqrt{\|w\|^2+1})w=\lambda u$. Hence
$$
\lambda=t\sqrt{\|w\|^2+1}.\tag{7}
$$
Since $\|v\|=\|Q^tv\|=\|tw\|$, by $(3)$ we have $t^2(\|w\|^2+1)=1+t^2\|w\|^2$, i.e. $t=\pm1$. Now, $w=cu$ for some scalar $c$ and unit vector $u$. Then by $(4),(6)$ and $(7)$, we see that $B=\pmatrix{X&v\\ w^t&\lambda}$ takes the form of $(0)$.
