Let $F$ be a field, $n$ be a positive integer. Denote by $h\_{F}(n)$ the maximal dimension of a subspace $X\subset F^n$ such that $(x,y)=0$ for any two (not necessary distinct) vectors $x,y\in F^n$, where $(x,y)=x\_1y\_1+\dots+x\_ny\_n$ for $x=(x\_1,\dots,x\_n)$, $y=(y\_1,\dots,y\_n)$. For example, $h\_{\mathbb{R}}(n)=0$ for any $n$.


It is clear that $h\_F(n)$ is non-decreasing by $n$, that $h\_F(n)\leq n/2$ (such $X$ is contained in $X^{\perp}$, hence $\dim(X)\leq \dim(X^{\perp})=n-\dim(X)$) and that always $h\_{F}(n+k)\geq h\_F(n)+h\_F(k)$. It allows to get $h\_{F}(n)=[n/2]$ for $F=\mathbb{C}$ or $F=\mathbb{F}\_p$ with prime $p=4k+1$ or $p=2$. 


Now take $p=4k+3$ and $F=\mathbb{F}\_p$. 


It is easy to get $h\_{F}(2)=0$, $h\_{F}(3)=1$, $h\_{F}(4)=2$ (take span of $(a,b,c,0)$ and $(0,-c,b,a)$ with $a^2+b^2+c^2=0$). Hence $h\_{F}(4n)=2n$, $h\_{F}(4n+1)=2n$, $h\_{F}(4n+3)=2n+1$. But what about $h\_F(4n+2)$? If it equals $2n+1$ for some $n$, then also for all greater $n$. But does there always exist such $n$ and if it does exist, how to find it as a function of $p$? I managed only to observe by hands that $h\_{F}(6)=2$ for $p=3$.



maximal number of mutually orthogonal vectors
This is the question of finding maximal [isotropic subspaces](http://en.wikipedia.org/wiki/Isotropic_quadratic_form) of
an inner-product space. The results for finite fields of odd characteristic
are well-known and can be found in Serre's *Course in Arithmetic*.


Let's consider the quadratic form $Q=x\_1^2+\cdots+x\_n^2$.
When $p\equiv 3$ (mod $4$) the dimension of the maximum isotropic
subspace is $2k$ for $n=4k$, $4k+1$, $4k+2$ and $2k+1$ for $n=4k+3$.


To see that it isn't $2k+1$ for $n=4k+2$ we argue as follows.
If a nonsingular quadratic form has a dimension $r$ isotropic subspace then $V$
it has a subspace $W$ or dimension $2r$ on which the form restricts to
$y\_1 y\_2+y\_3y\_4+\cdots+\cdots y\_{2r-1}y\_{2r}$. If $r=n/2$ the discriminant
of this form is $(-1)^r$. But this is not the same as the discriminant of $Q$
(namely $1$) modulo squares if $r$ is odd (since $p\equiv 3$ (mod $4$).


