Let $$X:=\{ g\in \mathrm{GL}(2n,\mathbb{R})\mid g^2=(-I)\}\subset \mathrm{GL}(2n,\mathbb{R}).$$
I want to show that it is a submanifold, and find out the number of its connected components as real smooth manifold. But it seems that it is not wise to use the inverse function theorem directly (for $\mathrm{GL}(2n,\mathbb{R})\rightarrow \mathrm{M}(2n,\mathbb{R})$, $g\mapsto g^2+I$). Is there an easier way for this specific example (I guess there is some background related to geometry or complex structure).
I know that $\mathrm{GL}(n,\mathbb{R})$ has two connected components (How many connected components does $\mathrm{GL}_n(\mathbb R)$ have? ). Is there a variant argument for the example here?
Thanks a lot in advance for any explanation and help!