I want to make clear that I am aware of the connectedness in the case of general real matrices. But here I ask about the subspace of symmetric ones.
If it is not the case, which are the connected components of such topological space? If it is the case, what would be the path on such space connecting say a signature matrix $J$ with positive determinant with the identity $I$? That is, give a nontrivial path of symmetric matrices with positive determinant from some signature matrix $J\neq I$ with $\det(J)=1>0$ to the identity $I$.
Remember that a signature matrix is a diagonal matrix whose diagonal entries belong to $\{-1,1\}$. Note also that, as this matrix in my question has to have positive determinant $-1$ appears an even number of times in such diagonal.
Great question!
This answer is inspired by @Ben Grossman's comment. We rely on the fact that eigenvalues are continuous functions of the entries of the matrix. (see this answer eigenvalues-are-continuous)
Call the space of symmetric matrices $S^{n\times n}$. The space of symmetric matrices with positive determinant $S^{n\times n}_+$. Then consider a symmetric matrix $M$ with more than 1 (at least 2) negative eigenvalues, and the identity matrix $I$. Consider a path connecting them $$\gamma:[0,1]\to S^{n\times n},t\mapsto A(t)\\ \gamma(0)=M,\gamma(1)=I $$. Such path is easy to construct $\gamma(t)=M+t(I-M)$
Then consider the eigenvalues of $A(t)$ along the path. There exist a continuous function $f_i:\mathbb R\to\mathbb R,t\mapsto \lambda_i(A(t))$ (real symmetric matrices have real eigenvalues), $i$ denotes the $i$th largest eigenvalue.
Then find the negative eigenvalues of $M$ let the eigenvalue be $\lambda_1$ then corresponding function $f_1(t)$ has $f_1(0)=\lambda_1<0,f_1(1)=1$ Then with the property of continuous function, there exist $t_*$ that $f(t_*)=0$, then $\det A(t_*)=0$, $A(t_*)\not\in S^{n\times n}_+$.
Thus for any path between $M$ and $I$ in the space of real symmstric matrices, the path cannot stay in $S^{n\times n}_+$, then we know $S^{n\times n}_+$ is not path connected.