$3\times 3$ symmetric matrix with signature $(2,1)$ I need to show the set of $3\times 3$ real symmetric matrices with signature $(2,1)$ is an open connected subset in the usual topology of $\mathbb{R}^6$.
To show connectedness I did like the following connected component of $GL(3,\mathbb{R})$ are  $GL^{+}(3,\mathbb{R}),GL^{-}(3,\mathbb{R})$.Consider a map $f:GL^{+}(3,\mathbb{R})\times\mathbb{R}^{+}\times \mathbb{R}^{+}\times\mathbb{R}^{-}\rightarrow GL(3,\mathbb{R})\times GL(3,\mathbb{R})$ such that $(P,a,b,c)\mapsto (PDP^{-1},(PDP^{-1})^t)$, Image of this map is 
all symmetric $3\times 3$ real matrix with $2$ eigen value$>0$ and $1$ eigen value$ <0$.
Thank you for help
 A: Edit: Let $S^{3\times3}$ denotes the set of all 3x3 real symmetric matrices and $S_{2,1}$ denotes the set of matrices in $S^{3\times3}$ with signature (2,1).
The eigenvalues of a matrix are continuous functions of the matrix entries. Therefore, if $A\in S_{2,1}$ and $B\in S^{3\times3}$ is such that $\|B-A\|$ is sufficiently small, the eigenvalues of $B$ will have identical signs to that of $A$. Hence $S_{2,1}$ is open in $S^{3\times3}$.
For connectedness, we want to devise a continuous path $f(t)$ that connects every $A\in S_{2,1}$ to $\mathrm{diag}(1,1,-1)$. For the moment, suppose $A$ is a diagonal matrix of the form $\mathrm{diag}(p_1,p_2,q)$, where $p_1,p_2>0$ and $q<0$ (hence its signature is (2,1)). In this case, we only need to consider the path $f:[0,1]\rightarrow S^{3\times3}$ defined by
$$f(t)=\mathrm{diag}\left(t+(1-t)p_1,\,t+(1-t)p_2,\,-t+(1-t)q\right).$$
You may verify that $f(0)=A,\, f(1)=\mathrm{diag}(1,1,-1)$ and the signature of $f(t)$ is (2,1) for every $t\in[0,1]$.
In general, however, $A$ is not readily diagonal, but orthogonally similar to a diagonal matrix. In other words, there exists a real orthogonal matrix $Q$ such that $\det Q=1$ and $A = QDQ^T$, where $D=\mathrm{diag}(p_1,p_2,q)$. So, the idea is to devise a path $f$, such that not only $D$ will be brought to $\mathrm{diag}(1,1,-1)$ along the path, the orthogonal matrix $Q$ will also be brought to the identity matrix $I$. Here we make use of fact that $Q=e^K$ for some skew symmetric matrix $K$ (see Wikipedia, for instance). So, the function $t\mapsto e^{(1-t)K}$ is equal to $Q$ when evaluated at $t=0$, and is equal to $I$ when evaluated at $1$. Hence we may consider the following $f$:
$$
f(t) = e^{(1-t)K}\begin{pmatrix}t+(1-t)p_1\\&t+(1-t)p_2\\&&-t+(1-t)q\end{pmatrix}e^{-(1-t)K}.
$$
Now $f(0)=A$ and $f(1)=\mathrm{diag}(1,1,-1)$. You may verify that $f(t)$ is symmetric and its signature is (2,1) for every $t\in[0,1]$. Hence every $A\in S_{2,1}$ is connected to $\mathrm{diag}(1,1,-1)$ by a path lying in $S_{2,1}$.
