Let $X$ be a real linear space with the quadratic form given in a basis $(e_1,...,e_r,e_{r+1},...,e_{r+s} )$ by
$$Q(x)=\sum_{i=1}^r x_i^2-\sum_{i=r+1}^{r+s} x_i^2$$ for $x=\sum_{i=1}^{r+s}x_i e_i.$
A linear subspace $V\subset X$ is called totally isotropic if $Q|_V=0$. I know that all maximal (in the sense of inclusion) totally isotropic subspace of $X$ have the same dimension.
Assume for example that $r\ge s$. How to prove the maximal isotropic subspaces for the $Q$ have dimension $r$?
Thanks.
Let $V$ be a maximal totally isotropic subspace. Let $W$ be a subspace of dimension $\max\{r,s\}$ on which $Q$ is positive or negative definite. (For instance, if $\max\{r,s\}=r$, let $W$ be the span of $e_1,\ldots,e_r$, and if $\max\{r,s\}=s$, let $W$ be the span of $e_{r+1},\ldots, e_s$.) Then \begin{equation*} \dim(V\cap W) = \dim(V) + \dim(W) - \dim(V+W) \end{equation*} is a basic result from linear algebra. Since $V$ is totally isotropic, $V\cap W=0$, so we get \begin{align*} \dim(V) &= \dim(V+W)-\dim(W) \\ &\leq \dim(X)-\max\{r,s\} \\ &= r + s - \max\{r,s\} \\ &= \min\{r,s\}. \end{align*} On the other hand, certainly we have $\dim(V)\geq\min\{r,s\}$, because $V$ is a maximal totally isotropic subspace and we know that there exists a totally isotropic subspace with dimension $\min\{r,s\}$.
Therefore $\dim(V)=\min\{r,s\}$.
EDIT: @JanVysoky is correct, I was too glib in claiming the inequality $\dim(V)\geq\min\{r,s\}$. Let $B$ be the symmetric bilinear form on $X$ corresponding to the quadratic form $Q$. Consider the subspace $V^\perp$ defined by \begin{equation*} V^\perp = \{v^\perp\in X:B(v,v^\perp)=0\text{ for all } v\in V\}. \end{equation*} The theory of bilinear forms tells us that, since $Q$ and hence $B$ is non-degenerate, $\dim(V^\perp) = \dim(X)-\dim(V)$. Let $W$ be a totally isotropic subspace of dimension $\min\{r,s\}$. (For instance, if $\min\{r,s\}=s$, let $W$ be the span of $e_1+e_{r+s},e_2+e_{r+s-1},\ldots,e_s+e_{r+1}$ as @Bach said in the comments.) The maximality of $V$ implies $V^\perp\cap W=0$. Then \begin{align*} 0 &= \dim(V^\perp\cap W) \\ &= \dim(V^\perp) + \dim(W) - \dim(V^\perp + W) \\ &\geq (\dim(X) - \dim(V)) + \dim(W) - \dim(X) \\ &= \min\{r,s\} - \dim(V) \end{align*} Therefore $\dim(V)\geq\min\{r,s\}$.