Let *K* be an ordered field. Define the *n*-sphere:


$$S^n(K) := \{ (x\_1,x\_2,\dots,x\_n+1) \in K^{n+1} \mid \sum\_{i=1}^{n+1} x\_i^2 = 1 \}$$


A set of vectors $v\_1, v\_2, \dots, v\_r \in S^n(K)$ is *orthonormal* if the dot product of any two of them is zero. An *orthonormal basis* is an orthonormal set of cardinality $n + 1$.


1. Is every vector in $S^n(K)$ a member of an orthonormal basis? If not, what is the largest *r* such that very vector is a member of an orthonormal set of size *r*?
2. More generally, given *n* and *s*, what is the largest *r* such that every orthonormal set in $S^n(K)$ of size *s* is contained in an orthonormal set of size *r*?


What's known:


1. For $n = 1$, every vector in $S^n(K)$ is a member of an orthonormal basis, regardless of *K*.
2. If *K* is Pythagorean (i.e., a sum of squares is a square) every orthonormal set completes to an orthonormal basis (use Gram-Schmidt).


Can more be said? I'm most interested in the case of *K* the field of rational numbers or a real number field, and the case $n = 2$.


ADDED LATER: I am assuming that *K* is an ordered field here. Otherwise, we need to modify our definition of orthonormal set to also include the condition that the vectors are linearly independent, which is automatically true for ordered fields. Observations for fields that are not ordered (such as non-real number fields or fields of positive characteristic) would also be much appreciated. MODIFIED: As Bjorn Poonen points out below, linear independence turns out to follow automatically in this case. (Though in general, over non-ordered fields, there can exist orthogonal vectors that are linearly dependent, our condition that the vectors be "normal" rules this out).



Spheres over rational numbers and other fields
Any orthonormal set extends to an orthonormal basis, over any field
of characteristic not $2$. This is a special case of [Witt's theorem](http://en.wikipedia.org/wiki/Witt%27s_theorem).


**EDIT:** In response to Vipul's comment: The proof of Witt's theorem is constructive, and leads to the following recursive algorithm for extending an orthonormal set $\lbrace v\_1,\ldots,v\_r \rbrace$ to an orthonormal basis.


Let $e\_1,\ldots,e\_n$ be the standard basis of $K^n$, where $e\_i$ has $1$ in the $i^{\operatorname{th}}$ coordinate and $0$ elsewhere. It suffices to find a sequence of reflections defined over $K$ whose composition maps $v\_i$ to $e\_i$ for $i=1,\ldots,r$, since then the inverse sequence maps $e\_1,\ldots,e\_n$ to an orthonormal basis extending $v\_1,\ldots,v\_r$. In fact, it suffices to find such a sequence mapping just $v\_1$ to $e\_1$, since after that we are reduced to an $(n-1)$-dimensional problem in $e\_1^\perp$, and can use recursion.


*Case 1:* $q(v\_1-e\_1) \ne 0$, where $q$ is the quadratic form. Then reflection in the hyperplane $(v\_1-e\_1)^\perp$ maps $v\_1$ to $e\_1$. 


*Case 2:* $q(v\_1+e\_1) \ne 0$. Then reflection in $(v\_1+e\_1)^\perp$ maps $v\_1$ to $-e\_1$, so follow this with reflection in the coordinate hyperplane $e\_1^\perp$.


*Case 3:* $q(v\_1-e\_1)=q(v\_1+e\_1)=0$. Summing yields $0=2q(v\_1)+2q(e\_1)=2+2=4$, a contradiction, so this case does not actually arise.


