## maximal number of mutually orthogonal vectors

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$.

-

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$).