My question is already existtent Prove that $\mathcal{O}(3,1)$ is a submanifold of $\mathcal{M}_4(\mathbb{R})$ , but $I$ don't understand the hint and there is no answer (and the question there is not exactly the same question I have). Thus, I put my own question here :
Consider the group $G:=\{M\in M_4(\mathbb{R})\mid M^{tr}PM=P\}$, where $P=\operatorname{diag}(1,1,1,-1)$. The claim is that $G$ is a $6$-dim. (differentiable) submanifold of $M_4(\mathbb{R})$.
What I have done so far: Let $f\colon M_4(\mathbb{R})\to M_4(\mathbb{R})$, $$f(M)=M^{tr}PM-P.$$ Then $G=f^{-1}(0)$ and $f$ is continuously differentiable.
For each $M\in G$, the map $Df(M)\colon M_4(\mathbb{R})\to \operatorname{Im }(Df(M))$ given by $Df(M)=M^{tr}P+PM$ has to be surjective onto a $10$-dimensional subspace of $M_4(\mathbb{R})$.
However, how to check $\dim \operatorname{Im }(Df(M))=10$ (as elementary as possible)? After checking this I can conclude that $G$ is a $6$-dim. submanifold of $M_4(\mathbb{R})$.
A more direct way to see this which has no need for any explicit calculations by hand: For every symmetric $A$ and $Y$, we can solve $MA+AM^T = Y$ for $M$ by finding any matrix $\widetilde{Y}$, symmetric or otherwise, that satisfies $\widetilde{Y}+\widetilde{Y}^T = Y$ (for example $\widetilde{Y}_{ij} := \begin{cases} Y_{ij} & i<j \\ \frac{1}{2}Y_{ii} & i=j \\ 0 & i>j \end{cases}$ does it) and solving $MA = \widetilde{Y}$ for $M$ instead. If $A$ is invertible, the latter is always solvable.