TITLE: Dimension of maximal totally isotropic space over finite field with standard bilinear form
QUESTION [5 upvotes]: Let $p$ be a prime and consider the vector space $\mathbb{F}_p^n$, equipped with the standard bilinear form $\langle x, y \rangle = \sum_{i=1}^n x_iy_i$. A subspace $U$ is said to be totally isotropic if $\langle u, v \rangle = 0$ for every two (not necessarily distinct) $u,v \in U$. What can we say about the dimension of a maximal totally isotropic subspace? A very well known upper bound is $\dim U \leq \lfloor \frac{n}{2} \rfloor$ and it follows by $\dim U + \dim U^{\perp} = n$ and $U \subseteq U^{\perp}$.
But how really is this bound attainable for $p>2$? For $p=2$ there is an easy example - take the subspace with basis $(1,1,0,\ldots,0)$, $(0,0,1,1,0,\ldots,0)$, $(0,0,0,0,1,1,0,\ldots,0)$, etc. If you mimic this for other $p$ (by taking chunks of $p$ consecutive $1$-s) the result would be of dimension $\lfloor \frac{n}{p} \rfloor$.
So is the truth closer to $\lfloor \frac{n}{p} \rfloor$ or to $\lfloor \frac{n}{2} \rfloor$? If it is too hard to answer for all $p$, perhaps focusing on $p=3$ only could give good insight. Any help appreciated!

REPLY [2 votes]: Supplementing reuns's excellent answer with the following.
Result: If $n\equiv2\pmod4$ and $-1$ is not a square in the field $K=\Bbb{F}_q$, then the space $K^n$, equipped with the standard bilinear form, does not have an $n/2$-dimensional totally isotropic subspace.
Proof. Write $k=n/2$, so $k$ is odd. Assume contrariwise that $V$ is a totally isotropic subspace. Let $g_1,g_2,\ldots,g_k$ be a basis of $V$. Let $A$ be the $k\times 2k$
matrix with rows $g_1,\ldots,g_k$. Without loss of generality we can assume that $A$
is in a reduced row echelon form. By shuffling the columns, if necessary, we can further assume that $A$ has the block form
$$
A=\left(\,I_k\,\vert\, B\,\right)
$$
where $B$ is some $k\times k$ matrix.
The assumption about total isotropicity is equivalent to the requirement $AA^T=0_{k\times k}$. By expanding the matrix product in block form we see that this is equivalent to the requirement
$$
BB^T=-I_k. \qquad(*)
$$
Let's look at the determinants. On the left hand side of $(*)$ we have $(\det B)^2$. On the right hand side we have $(-1)^k$. As $-1$ was not assumed to be a square, and $k$ is odd, this is a contradiction.