Determining all the maximal linear subspace of a quadric $\newcommand\P{\mathbb P} \newcommand\R{\mathbb R}$Is there an algorithm to parameterically determine all the maximal linear subspaces of a regular quadric hypersurface in some projective real space? I know how to compute the dimension of this maximal subspace, but I'm not sure how to find ALL subspaces with maximal dimensions. For a real one-sheeted hyperboloid in $\P^3(\R)$ I think I can easily get the family of lines parametrically (parameterized say by the points on the hyperboloid). But what about higher dimensional quadrics? For instance if I have a quadric defined by
$$x_0^2+x_1^2+x_2^2 - x_3^2 - x_4^2 - x_5^2 $$
in $\P^5(\R)$. What are all the maximal linear subspaces. I know the obvious ones e.g. the intersection of hyperplanes $x_0=x_3, x_1=x_4$ and $x_2=x_5$ will give me maximal dimensional linear subspace ($\dim= 2$) and permutations of these i.e. $x_0=y_0, x_1=y_1, x_2=y_2$ where $(y_0,y_1,y_2)$ is any permutation of $(x_3,x_4,x_5)$. But obviously there are more linear subspace with maximal dimension. Could they all be obtained via some orthogonal transformation of the ones I just obtained?. Can I already write these transformations parameterized by say the points in the quadric? Through any point $P$ of the quadric is it guaranteed that I can find a maximal linear space that passes it and are they finitely many? This was just an example, what if I increase the dimension (as long as the quadric remains regular)?
 A: Over a field $k$ of characteristic not 2, quadrics in $\Bbb P^n_k$ exactly correspond to quadratic forms on $k^{n+1}$. Under this correspondence, maximal linear subspaces of the quadric correspond exactly to maximal isotropic subspaces of the quadratic form. As we're over $\Bbb R$, every quadratic form is equivalent by diagonalization to one with $r$ copies of $1$ on the diagonal, $s$ copies of $-1$ on the diagonal, and $t$ copies of $0$ on the diagonal. Maximal isotropic subspaces exist, and all maximal isotropic subspaces are of dimension $\min(r,s)+t$ (this is all standard linear algebra).
To find these subspaces, we pick a $q=\min(r,s)$-dimensional subspace embedded in the direct sum of the $1$ and $-1$ eigenspaces for our matrix which has a basis of the following form: $v_1\oplus w_1,\cdots,v_q\oplus w_q$ where the $v_i$ and $w_i$ are all mutually orthogonal and $|v_i|=|w_i|$. We also throw in the entire $0$-eigenspace. This will give us many choices, all of which can be obtained from each other by the action of the indefinite orthogonal group $O(r,s)$ acting on the direct sum of the $1$ and $-1$ eigenspaces.
There does exist a maximal linear subspace through every real point (though sometimes it's just a point, or your quadric has no real points). Why? If you have a point given by $[x_0:\cdots,x_n]$, the span of the vector $(x_0,\cdots,x_n)$ defines an isotropic subspace, which must be contained in a maximal isotropic subspace. There may be infinitely many such subspaces - consider the point $p=[0:0:1:0:0:1]$ in your example. Then the projectivization of the subspace $V_\theta = \operatorname{Span} \{ (0,0,1,0,0,1), (\cos(\theta),\sin(\theta),0,0,1,0), (-\sin(\theta),\cos(\theta),0,1,0,0)\}$ passes through $p$ for any $\theta\in\Bbb R$.
A: I am going to answer my question at least from the given example. That was an example of a nonsingular quadric of even dimension (the ambient space is odd-dimensional) such that the positive and negative signatures are equal. In the particular example we had a quadric $X$ defined by
$$x_0^2+x_1^2 + x_2^2 - x_3^2-x_4^2-x_5^2 = 0$$
All maximal linear subspaces of this quadric are of the form
$$\{\langle(\vec v_i : A\vec v_i) : i=0\dots 3\rangle : \vec v_1,\vec v_2, \vec v_3 \text{ spans } \mathbb R^3, A\in O(3)\}$$
I leave the proof of this as an exercise.
This also answers : Every point $P\in X$ lies in a maximal linear subspace of $X$. To get this, we write $P$ as $(\vec v: A\vec v)$ for some orthogonal $A\in O(3)$ (recall that the point is in the quadric iff the norm from the first three coordinates has the same as the norm of the last three coordinates iff there is an orthogonal matrix transforming the first three coordinates to the last three coordinates), were $\vec v$ cannot be the zero vector. Then we just extend $\vec v$ so that it spans $\mathbb R^3$ i.e. if we set $\vec v_1 := \vec v$ and find $\vec v_2,\vec v_3$ such that the $\vec v_i$s spans $\mathbb R^3$ then the maximal linear space
$$\langle (\vec v_i : A\vec v_i) : i=1,\dots, 3\rangle$$
lies in $X$ and $P$ is in it as well.
For the more sophisticated case when there are $0$ eigenvalues for the quadratic form or when the positive and negative signatures ($p$ and $q$ resp.) are unequal we deal with indefinite orthogonal group $O(p,q)$ as explained in KReisers answer. I could write a more explicit answer if necessary.
