\documentclass[12pt]{article}
\usepackage{e-jc}

\usepackage{hyperref}

\usepackage{amssymb, latexsym,pdfsync,amsthm,amsmath}


% we recommend the graphicx package for importing figures
\usepackage{graphicx}

% use this command to create hyperlinks (optional and recommended)
%\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}



%\theoremstyle{plain}
%\newtheorem{theorem}{Theorem}
%\newtheorem{corollary}{Corollary}
%\newtheorem{lemma}{Lemma}
%\newtheorem{proposition}{Proposition}
%\theoremstyle{definition}
%\newtheorem{definition}{Definition}
%\newtheorem{remark}{Remark}


% declare theorem-like environments
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{claim}[theorem]{Claim}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{open}[theorem]{Open Problem}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{question}[theorem]{Question}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{note}[theorem]{Note}



\newcommand{\SSS}{\mathbb{S}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\FF}{\mathbb{F}}
\newcommand{\Fp}{\mathbb{F}_p}
\newcommand{\Fq}{\mathbb{F}_q}
\newcommand{\Fqn}{\mathbb{F}_{q^n}}
\newcommand{\Fqm}{\mathbb{F}_{q^m}}
\newcommand{\Fqd}{\mathbb{F}_{q^d}}
\newcommand{\Fqt}{\mathbb{F}_{q^2}}
\newcommand{\dd}{\text{d}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\EE}{\mathbb{E}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\HH}{\mathcal H}
\newcommand{\B}{\mathcal B}
\newcommand{\Q}{\mathcal Q}
\newcommand{\PPP}{\mathcal P}

\def\PG{\mathrm{PG}}


\newcommand{\FO}{\mathbb{F}_{q}^{\Omega}}

\newcommand{\npmatrix}[1]{\left[ \begin{matrix} #1 \end{matrix} \right]}



\newcommand{\Ux}{U^{\times}}
%\newtheorem{conjecture}{Conjecture}
%\newtheorem{Proposition}{Proposition}


\newcommand{\rank}{\mathrm{rank}}



\newtheorem{Theorem} {Theorem} [section]
\newtheorem{Proposition} [Theorem] {Proposition}
\newtheorem{Corollary} [Theorem] {Corollary}
\newtheorem{Lemma} [Theorem] {Lemma}
\newcommand{\Proof}{\noindent{\bf Proof.}\quad }
%\newcommand{\qed}{\hfill$\Box$\medskip}
\newcommand{\Ff}{{\mathbb F}}
\newcommand{\imgx}{{\rm im\,}}
\newcommand{\kerx}{{\rm ker\,}}
% avoid \mod, \pmod
\newcommand{\modx}{{\rm mod~}}
% substitute for { n \brack m }
\newcommand{\qnom}[2]{\genfrac{[}{]}{0pt}{}{#1}{#2}}
\newcommand{\half}{{\frac{1}{2}}}
\newcommand{\1}{{\bf 1}}

% Young diagrams
\newcount\cols
{\catcode`,=\active\catcode`|=\active
 \gdef\Young(#1){\hbox{$\vcenter
 {\mathcode`,="8000\mathcode`|="8000
  \def,{\global\advance\cols by 1 &}%
  \def|{\cr
        \multispan{\the\cols}\hrulefill\cr
        &\global\cols=2 }%
  \offinterlineskip\everycr{}\tabskip=0pt
  \dimen0=\ht\strutbox \advance\dimen0 by \dp\strutbox
  \halign
   {\vrule height \ht\strutbox depth \dp\strutbox##
    &&\hbox to \dimen0{\hss$##$\hss}\vrule\cr
    \noalign{\hrule}&\global\cols=2 #1\crcr
    \multispan{\the\cols}\hrulefill\cr%
   }
 }$}}
 \gdef\Skew(#1:#2){\hbox{$\vcenter
 {\mathcode`,="8000\mathcode`|="8000
  \dimen0=\ht\strutbox \advance\dimen0 by \dp\strutbox
  \def\boxbeg{\vbox
	  \bgroup\hrule\kern-0.4pt\hbox to\dimen0\bgroup\strut\vrule\hss$}%
	\def\boxend{$\hss\egroup\hrule\egroup}%
  \def,{\boxend\boxbeg}%
	\def|##1:{\boxend\vrule\egroup\nointerlineskip\kern-0.4pt
    \moveright##1\dimen0\hbox\bgroup\boxbeg}%
	\def\\##1\\##2:{\boxend\vrule\egroup\nointerlineskip\kern-0.4pt
		\kern ##1\dimen0\moveright##2\dimen0\hbox\bgroup\boxbeg}%
  \moveright#1\dimen0\hbox\bgroup\boxbeg#2\boxend\vrule\egroup
 }$}}
}

\def\smallsquares
 {\textfont0=\scriptfont0 \scriptfont0=\scriptscriptfont0
  \textfont1=\scriptfont1 \scriptfont1=\scriptscriptfont1
  \setbox0=\hbox{$($}
  \setbox\strutbox=\hbox{\vrule width 0pt height\ht0 depth\dp0 }% smaller
 }




%\setlength{\parindent}{0pt}
%\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}


\title{Counting symmetric nilpotent matrices}

% input author, affilliation, address and support information as follows;
% the address should include the country, and does not have to include
% the street address

\author{Andries E. Brouwer\\
\small Department of Mathematics\\[-0.8ex]
\small Technische Universiteit Eindhoven\\[-0.8ex] 
\small Netherlands.\\
\small\tt andries.brouwer@cwi.nl\\
\and
Rod Gow\\
\small School of Mathematical Sciences\\[-0.8ex]
\small University College Dublin\\[-0.8ex] 
\small Ireland.\\
\small\tt rod.gow@ucd.ie\\
\and
John Sheekey\thanks{Supported by the Research Foundation Flanders-Belgium (FWO-Vlaanderen).}\\
\small Department of Mathematics\\[-0.8ex]
\small Universiteit Gent\\[-0.8ex] 
\small Belgium.\\
\small\tt johnsheekey@gmail.com\\
}


% \date{\dateline{submission date}{acceptance date}\\
% \small Mathematics Subject Classifications: comma separated list of
% MSC codes available from http://www.ams.org/mathscinet/freeTools.html}

\date{\dateline{XX}{XX}\\
\small Mathematics Subject Classifications: 15A33, 05B20}

\begin{document}

\maketitle

\begin{abstract}
We determine the number of nilpotent matrices of order $n$ over $\Ff_q$
that are self-adjoint for a given nondegenerate symmetric bilinear form,
and in particular find the number of symmetric nilpotent matrices.
\end{abstract}

\section{Introduction}
Consider matrices of order $n$ over the finite field $\Ff_q$.
Trivially, the total number of such matrices is $q^{n^2}$,
of which $q^{n(n+1)/2}$ are symmetric.
Less trivially, the number of nilpotent matrices is $q^{n(n-1)}$---see
below for references and yet another proof.
The aim of this note is to count symmetric
nilpotent matrices, and more generally nilpotent matrices that are
self-adjoint for a given nondegenerate symmetric bilinear form.

\subsection{Nilpotent matrices}
A linear transformation $N$ of a vector space $V$ is called
{\em nilpotent} when $N^e = 0$ for some nonnegative integer $e$.
The smallest such $e$ is called the {\em exponent} of $N$.

\subsection{Self-adjoint matrices}
Let $V$ be a vector space of dimension $n$ over $\Ff_q$,
and let $g : V \times V \to \Ff_q$ be a nondegenerate symmetric bilinear
form. The linear transformation $N$ of $V$ is called {\em self-adjoint}
with respect to $g$ if $g(Nx,y) = g(x,Ny)$ for all $x,y \in V$.
If we fix a basis for $V$, the form $g$ is represented by a
nonsingular symmetric matrix $G$, so that $g(x,y) = x^\top G y$
(for column vectors $x,y$). Now $N$ (given by a matrix also called $N$)
is self-adjoint when $(GN)^\top = GN$, that is, when the matrix $GN$
is symmetric. Thus, counting symmetric nilpotent matrices is the same
as counting nilpotent linear transformations that are self-adjoint
for the {\em standard form}, the form with $G = I$
so that $g(x,y) = \sum x_i y_i$.

\subsection{Nondegenerate symmetric bilinear forms}
For nonzero constants $c$ the forms $g$ and $cg$ lead to the same
self-adjoint $N$.
For nonsingular linear transformations $A$ the (congruent) forms given by the
matrices $G$ and $A^\top GA$ lead to the same number of self-adjoint $N$.
(When $GN$ is symmetric, then so is $A^\top GNA$, so that $A^{-1}NA$ is
self-adjoint for $A^\top GA$.)
Therefore, if we are interested in the number of self-adjoint nilpotent $N$,
we need only look at $g$ up to scaling and congruence.

For odd $n$ (and for $n=0$), there is up to scaling and congruence
only one nondegenerate symmetric bilinear form.
We can take the standard form as representative.
For nonzero even $n$, there are two types.
For odd $q$ the form can be elliptic or hyperbolic.
For even $q$ the form can be symplectic or not (cf.~\cite{Albert}).

\medskip
The counts (of nilpotent linear transformations that are self-adjoint
for a given form) that we shall determine are $e(2m), h(2m), p(2m+1)$
(for odd $q$ and an elliptic, hyperbolic or standard form)
and $z(2m), s(2m), s(2m+1)$ (for even $q$, and a symplectic or standard form),
where the parameter is the dimension~$n$.
The letters $e$, $h$, $p$, $z$, $s$ are intended to be mnemonic of
{\it elliptic}, {\it hyperbolic}, {\it parabolic},
{\it zero} (diagonal), and {\it standard}.
If $n = 0$, there is no elliptic form so that $e(0)$ is undefined.
We define $e(0) = 1$.

\subsection{Results}
\begin{Proposition}\label{res1}
Each of $e(2m)$, $h(2m)$, $p(2m+1)$, $z(2m)$, $s(2m)$, $s(2m+1)$
is a polynomial in $q$ for each $m \ge 0$.
We have $e(0)=h(0)=z(0)=s(0)=p(1)=s(1)=e(2)=1$.
\end{Proposition}

The identities below are identities as polynomials in $q$.

\begin{Proposition}\label{res2}
$z(2m) = q^{2m^2}$.
\end{Proposition}

\begin{Proposition}\label{res3}
$s(2m+1) = p(2m+1)$.
\end{Proposition}

Put $a(2m) = (h(2m)+e(2m))/2$ and $d(2m) = (h(2m)-e(2m))/2$,
so that $h(2m) = a(2m)+d(2m)$ and $e(2m) = a(2m)-d(2m)$.

\begin{Proposition}\label{res4}
$s(2m) = a(2m)$.
\end{Proposition}

\begin{Proposition}\label{res5}
$p(2m+1) = q^{2m} a(2m) + q^m d(2m)$.
\end{Proposition}

\begin{Proposition}\label{res6}
$p(2m+1) = (q^{2m}-1) a(2m) + z(2m)$.
\end{Proposition}

The preceding two identities allow one to express $d(2m)$
in terms of $a(2m)$:
$$d(2m) = q^{m(2m-1)} - q^{-m} a(2m) .$$
% Note that $a(0)+d(0)$ is defined, even though $a(0)$ is not.

\begin{Proposition}\label{res7}
$a(2m) = q^{2m-1} p(2m-1)$ for $m > 0$.
\end{Proposition}

\begin{Corollary}\label{res8}
$p(2m+1) = q^{2m-1} (q^{2m}-1) p(2m-1) + q^{2m^2}$ for $m > 0$.
\end{Corollary}

This determines all polynomials
$e(2m)$, $h(2m)$, $p(2m+1)$, $z(2m)$, $s(2m)$, $s(2m+1)$.
In the appendix we give a small table.
The enumerations are summarized as follows.

\begin{Proposition}\label{res9}
The number \#(n) of symmetric nilpotent matrices of order $n$ is given by
$$\#(n) = \left\{ \begin{array}{ll}
s(n) & \mbox{when $n$ is odd or $q$ is even,} \\
e(n) & \mbox{when $n \equiv 2$ $(\modx 4)$ and $q \equiv 3$ $(\modx 4)$,} \\
h(n) & otherwise,
\end{array}\right.$$
and for $n > 0$ these are given by

$$s(2m) = q^{m^2} \sum_{i=0}^{m-1} q^{i^2}
\prod_{j=i+1}^{m-1} (q^{2j}-1) ,$$

$$s(2m+1) = q^{m^2} \sum_{i=0}^m q^{i^2}
\prod_{j=i+1}^m (q^{2j}-1) ,$$

$$e(2m) = -q^{2m^2-m} + (q^m+1) q^{m^2-m} \sum_{i=0}^{m-1} q^{i^2}
\prod_{j=i+1}^{m-1} (q^{2j}-1) ,$$

$$h(2m) = q^{2m^2-m} + (q^m-1) q^{m^2-m} \sum_{i=0}^{m-1} q^{i^2}
\prod_{j=i+1}^{m-1} (q^{2j}-1) .$$

\end{Proposition}

As a side result we find the mysterious equality

\begin{Proposition}\label{res10}
If $n$ is odd,
and also if $n$ and $q$ are even and the form is not symplectic,
then $\sum_N 1 = \sum_{N,x} 1$,
where the sums are over selfadjoint nilpotent matrices $N$,
and nonisotropic projective points $x$ such that $Nx = 0$.
\end{Proposition}

\section{Fitting decomposition}
Let $V$ be a finite-dimensional vector space,
and $M$ a linear transformation of $V$.
The map $M$ determines a unique decomposition $V = U \oplus W$
as direct sum of subspaces $U,W$, both invariant under $M$,
where the restriction of $M$ to $U$ is nilpotent,
and the restriction of $M$ to $W$ is invertible.
This decomposition is known as the {\em Fitting decomposition}.

[Proof: Take $U = \ker M^e$ and $W = \imgx M^e$ for sufficiently large $e$.]

\medskip
If $g$ is a nondegenerate symmetric or alternating bilinear form on $V$,
and $M$ is self-adjoint for $g$, then $U$ and $W$ are $g$-orthogonal,
that is, $g(U,W) = 0$. It follows that $U$ and $W$ are nondegenerate
(that is, that the restriction of $g$ to $U$ and $W$ is nondegenerate),
and $V = U \perp W$, and $U = W^\perp$, $W = U^\perp$
(where $A^\perp := \{ v \in V \mid g(a,v) = 0 ~\mbox{for all $a \in A$} \}$).

\subsection{Counting nilpotent matrices}
For a finite-dimensional vector space $V$ over $\Ff_q$,
let $N(V)$ (resp. $S(V)$) be the number of nilpotent (resp. invertible)
linear transformations on $V$.
These numbers only depend on the dimension $n$ of $V$, so we can
write $N(V) = N(n)$ and $S(V) = S(n)$.
Clearly, $S(V) = |{\rm GL}(V)|$, so that
$S(n) = |{\rm GL}_n(q)| = q^{n(n-1)/2} \prod_{i=1}^n (q^i - 1)$.

\begin{Theorem} {\rm (Philip Hall)} $N(n) = q^{n(n-1)}$.
\end{Theorem}

There are many proofs, see \cite{Hall,FH,Ge,Cr}. Hall \cite{Hall}
contains two different proofs, one involving a form of M\"obius inversion,
the other exploiting the theory of partitions. Here we use the method
that will be used again to count symmetric nilpotent matrices.

\medskip\noindent\Proof
Considering the Fitting decomposition of all linear transformations of $V$
yields the equality
$$q^{n^2} = \sum_{V = U \oplus W} N(U) S(W) .$$
The number of ways to write $V$ as a direct sum of an $m$-space
and an $(n-m)$-space is $q^{m(n-m)} \qnom{n}{m}_q$
($= \frac{S(n)}{S(m)S(n-m)}$), where $\qnom{n}{m}_q$
denotes the Gaussian coefficient, and we obtain
$$q^{n^2} = S(n) \sum_{m=0}^n \frac{N(m)}{S(m)}$$
so that $\frac{q^{n^2}}{S(n)} - \frac{q^{(n-1)^2}}{S(n-1)} =
\frac{N(n)}{S(n)}$, and the result follows.
\qed

\subsection{Counting symplectic nilpotent matrices}
Let $V$ be a vector space of dimension $2m$ over $\Ff_q$,
and consider the symplectic form $g$ on $V$ defined with respect
to some basis by $g(x,y) = \sum_{i=1}^m x_i y_{2m-i} - x_{2m-i} y_i$
so that its matrix is
$G = \left( \begin{smallmatrix} 0&D \\ -D&0 \end{smallmatrix} \right)$
where $D$ is the backdiagonal matrix of order $m$ with $D_{ij} = 1$ when
$i+j=m+1$ and $D_{ij}=0$ otherwise. Now $D^2 = I$ and $D^\top = D$
and $G^\top = -G$.

The corresponding Lie algebra $\mathfrak{sp}_{2m}$ consists of
the matrices $X$ (of order $2m$) with $g(Xx,y)+g(x,Xy)=0$ for all $x,y$,
i.e., with $(GX)^\top = GX$.
Writing $X = \left( \begin{smallmatrix} P&Q \\ R&S \end{smallmatrix} \right)$,
we see that the condition is that $DQ$ and $DR$ are symmetric,
and $DP + (DS)^\top = 0$. If we write $M'$ for $DM^\top D$,
which is $M$ reflected in the back diagonal, this becomes
$Q = Q'$ and $R = R'$ and $S = -P'$. It follows immediately
that the total number of such matrices $X$ equals $q^{2m^2+m}$.
For even $q$ these are the matrices symmetric w.r.t. the backdiagonal.


\begin{Theorem}\label{steinberg}
{\rm (Steinberg \cite{St}, Springer \cite{Spr})}
The number of nilpotent elements of $\mathfrak{sp}_{2m}$
is $q^{2m^2}$. In particular we have $z(2m) = q^{2m^2}$ for even $q$.
\end{Theorem}

\Proof
Considering the Fitting decomposition of all elements $X$ of
$\mathfrak{sp}_{2m}$, we find
$$q^{2m^2+m} = \sum_U N(U) S(U^\perp)$$
where the sum is over all nondegenerate subspaces $U$ of $V$,
and $N(U)$ is the number of nilpotent symplectic maps on $U$
(provided with $g|_U$) and $S(W)$ % (for $W = U^\perp$)
is the number of invertible symplectic maps on $W$ (provided with $g|_W$).

It is easy to determine the number of nondegenerate $U$
of any given dimension $2h$, and the result is
$\qnom{m}{h}_{q^2} q^{2h(m-h)}$.

It is also easy to determine the number of invertible symplectic
maps on a given $2h$-space, and the result is
$(q-1)(q^3-1)\cdots(q^{2h-1}-1) q^{h(h+1)}$.

That means that our claim follows by induction on $m$ if we prove the
identity
$$
q^{2m^2+m} = \sum_{h=0}^m q^{2(m-h)^2} \qnom{m}{h}_{q^2} q^{2h(m-h)}
(q-1)(q^3-1)\cdots(q^{2h-1}-1) q^{h(h+1)} .
$$
One can ask a computer algebra system, e.g. invoke
the Maple {\tt qzeil} function,
or one can rewrite the equation to be proved as
${}_2\phi_0[q^{1/2},q^{-m};q,q] = q^{m/2}$.
But this is a trivial case of the $q$-Chu-Vandermonde identity.
\qed

More generally Steinberg \cite[15.3]{St} shows for unipotent elements
in connected reductive linear algebraic groups, and Springer \cite[(7)]{Spr}
for nilpotent elements in the corresponding Lie algebras, that there are
$q^N$ of them, where $N = |\Phi|$ is the number of roots of the root system.

For $A_{n-1}$, that is, $GL(n)$, we have $|\Phi| = n(n-1)$,
and we see again that there are $q^{n(n-1)}$ nilpotent matrices
of order $n$.

For $C_m$, that is, $Sp(2m)$, we have $|\Phi| = 2m^2$.
If $q$ is even, there are $q^{2m^2}$ nilpotent back-symmetric matrices
of order $2m$.

A matrix $N$ is {\em skew-symmetric} when $N$ has zero diagonal
and $N = -N^\top$. For $D_m$, that is, $O^+(2m)$, we have $|\Phi| = 2m(m-1)$.
There are $q^{2m(m-1)}$ skew-symmetric nilpotent matrices of order $2m$.

For $B_m$, that is, $O(2m+1)$, we have $|\Phi| = 2m^2$.
There are $q^{2m^2}$ skew-symmetric nilpotent matrices of order $2m+1$.

Lusztig \cite{Lusztig} gives counts of nilpotent (skew symmetric)
matrices of given rank.

\section{Young diagrams}
A {\em partition} $\lambda$ of a nonnegative integer $n$ is a nonincreasing
sequence $\lambda_1,\ldots,\lambda_m$ of positive integers with
$\sum \lambda_i = n$.
The {\em Young diagram} $Y_\lambda$ of a partition $\lambda$ is
the shape obtained by placing left-adjusted rows of squares
of lengths $\lambda_1,\ldots,\lambda_m$ below each other.
For example, if $\lambda = (4,2,2,1)$, then
$Y_\lambda = {\smallsquares\Young(,,,|,|,|)}$.
The {\em order} of a Young diagram is the number of cells (squares).
A {\em row group} of a Young diagram is a maximal set
of rows of equal length.

\subsection{The Young diagram of a nilpotent map}
Let $N$ be a nilpotent linear transformation of exponent $e$
on an $n$-dimensional vector space $V$.
The map $N$ determines a unique Young diagram $Y$ of order $n$,
with $d := \dim \ker N$ rows and $e$ columns, that has a square in
row $i$, column $j$, if $\dim \ker N \cap \,\imgx N^{j-1} \ge i$.
We call $Y$ the {\em shape} of $N$.

We can choose a basis $B = \{u_1,\ldots,u_n\}$ for $V$ such that
$B \cup \{0\}$ is closed under $N$, and $Nu_i = Nu_j$, $i \ne j$
implies $Nu_i = Nu_j = 0$.
(This is equivalent to finding a Jordan normal form of $N$.)
We say that such a $B$ {\em fits} $N$.
Each element $u$ of $B$ can be assigned a square $(i,j)$ of $Y$
in such a way that either $j=1$ and $Nu = 0$, or $j > 1$ and $Nu$
is the element of $B$ assigned to square $(i,j-1)$.
Thus, the rows (resp. squares) of $Y$ correspond to
the Jordan blocks of $N$ (resp. the elements of $B$).
Multiplication by $N$ corresponds to a left shift on $Y$.

We see that the Young diagrams $Y$ of order $n$ label the
$GL_n$-conjugacy classes of nilpotent maps on $V$.

\subsection{Size of a conjugacy class}
Let $V$ be a vector space over $\Ff_q$.
Let $N(Y)$ be the number of nilpotent linear transformations
of $V$ with given Young diagram $Y$, i.e., the size of the
$GL(n,q)$-conjugacy class labeled by $Y$. Then $N(Y) = |G|/|G_N|$,
where $G = GL(n,q)$, so that $|G| = \prod_{i=0}^{n-1} (q^n-q^i) =
q^{n(n-1)/2} [1][2]\ldots [n-1]$ (with $[a] := q^a-1$) is the total
number of ordered bases of $V$, and $G_N = \{ A \in G \mid AN = NA \}$
for some $N$ of shape $Y$, so that $|G_N| = f(Y)$ is
the number of ordered bases that fit $N$
(in the sense that the $j$-th basis vector is assigned
the $j$-th cell of $Y$, with cells enumerated in some fixed order).

\subsection{Number of ordered bases that fit a nilpotent map}
We saw that $N(Y) = |G|/f(Y)$. We now determine $f(Y)$.
%
First choose the basis for $\ker N$.
Each row group, say with rows $i+1,\ldots,j$,
contributes a factor $$(q^j-q^i)(q^j-q^{i+1})\ldots (q^j-q^{j-1}) =
[1][2]\ldots [j-i]q^{{j(j-1)/2}\,-\,{i(i-1)/2}}.$$
Altogether we found $[1]^{e_1}[2]^{e_2}\ldots q^{d(d-1)/2}$ so far,
where $d = \dim \ker N$ and $e_h$ is the number of row groups
of size at least $h$.
Next choose the rest of the basis. Each square of $Y$ not in the first column
contributes a factor $q^a$, where $a$ is the number of squares in
the previous column. This defines $f(Y)$, e.g.
$f(\,{\smallsquares\smallsquares\Young(,,|)}\,) =
(q-1)(q^2-q).q^2.q = [1]^2 q^4$.
(Proof: the vector for the rightmost square of each row determines the row,
and is chosen modulo $\ker N^{j-1}$ if the square is in column $j$.)

\section{Forms}\label{forms}
As noted above, for nonzero even dimension $n$
nondegenerate symmetric bilinear forms $g$ (with matrix $G$) have two types.

For odd $q$ the form can be elliptic or hyperbolic.
It will be hyperbolic precisely when $(-1)^{n/2} \det G$ is a square.
The standard form is hyperbolic when $q \equiv 1$ (mod 4),
and also when $4|n$, and elliptic otherwise.

For even $q$ the form can be symplectic or not.
Symplectic forms are characterized by $g(x,x)=0$ for all $x$,
or, equivalently, by the fact that $G$ has zero diagonal.
For a non-symplectic form the set of $x$ with $g(x,x)=0$ is a hyperplane.
The standard form is symplectic only for $n = 0$. For $n > 0$, its hyperplane
is the orthogonal complement $\1^\perp$ of the all-1 vector $\1$.

\subsection{Numbers of forms}
Let $g_s := g_s(n)$ be the total number of nondegenerate symmetric
bilinear forms on the vector space $V$ of dimension $n$,
and let $g_0$, $g_1$, $g_e$, $g_h$ be the numbers of such forms
that are symplectic, non-symplectic, elliptic or hyperbolic, respectively.
(Then $g_s = g_0+g_1$ and $g_s = g_e+g_h$ for even $n$ and even/odd~$q$.)
% These numbers are easily found as quotients of the size of $GL_n$
% and the size of the subgroup preserving the form.

We have:
$$g_s = g_s(n) = \left\{ ~ \begin{array}{lll}
[1][3]\ldots [2m-1] q^{m(m+1)} & {\rm for} & n = 2m \\{}
[1][3]\ldots [2m+1] q^{m(m+1)} & {\rm for} & n = 2m+1
\end{array}\right.$$
and for $n = 2m$: if $q$ is even, then
$$g_0 = q^{-2m} g_s , ~~ g_1 = (1 - q^{-2m}) g_s,$$
and if $q$ is odd,
$$g_e = \half (1 - q^{-m}) g_s ,~~ g_h = \half (1 + q^{-m}) g_s .$$

(Proof: For $g_s$, cf.~\cite[9.5.9]{BCN}. The values $g_0$, $g_e$, $g_h$
follow as quotients of the size of $GL_n$ and the sizes of the subgroup
$Sp_{2m}$,  $GO_{2m}^-$, $GO_{2m}^+$ preserving the form.)
% This also works for $g_s(2m+1)$ is we remember that for odd $q$
% there are two types up to congruence.

\subsection{Gram matrix of a form for which $N$ is self-adjoint}
We show that the Gram matrix of a form for which a nilpotent map $N$
is self-adjoint has a block structure that only depends on
the shape $Y$ of $N$.

\medskip
Let $g$ be a symmetric bilinear form for which a fixed nilpotent
map $N$ of shape $Y$ is self-adjoint.
Let $B = \{u_1,\ldots,u_n\}$ be a basis that fits $N$.
The Gram matrix $G = (g_{ij})_{ij}$ with $g_{ij} = g(u_i,u_j)$
uniquely determines the form $g$ (since $g$ is bilinear).
The form $g$ will be nondegenerate precisely when $G$ is nonsingular.

The basis vectors $u_i$ can be identified with squares in $Y$.
Then $N$ acts on $Y \cup \{0\}$ via `left shift',
and the rows and columns of $G$ can be indexed by $Y$.

Let row $i$ in $Y$ have length $r_i$.
Since $N$ is self-adjoint, we have $g(Ny,z) = g(y,Nz)$
for $y,z \in Y$. It follows that $g((h,i),(j,k)) = 0$
when $i \le r_j-k$ or $k \le r_h-i$.
In words: $G_{yz}=G_{zy}=0$ when square $y$ has fewer
squares to the left than $z$ has to the right.
This is the `forced zero' region of $G$.

Now let $g$ also be nondegenerate.
For each row group $R$ consisting of $r$ rows of length $s$,
and each $i$, $1 \le i \le s$, there is a nonsingular $r \times r$ subblock
in $G$ with rows indexed by $\{ (h,i) \in Y \mid h \in R\}$,
and columns indexed~by~$\{ (h,s+1-i) \in Y \mid h \in R \}$.

(Indeed, suppose $\{(y,y') \mid y \in Y\}$ is a transversal of $G$
that contributes to $\det G$. If $y = (h,i)$, then write
$\delta(y) = r_h+1-2i$. Now $\sum_{y \in Y} \delta(y) = 0$,
and $g(y,y') = 0$ if $\delta(y)+\delta(y') > 0$, so
$\delta(y)+\delta(y') = 0$ for all $y \in Y$.
It follows that if $y=(h,i)$ and $y'=(j,k)$, then
$\max(r_h,r_j)+1 \le i+k = \half(r_h+r_j)+1$, so $r_h = r_j$,
so that $y,y'$ belong to the same row group, and $i+k=1+r_h$.)

\medskip
We proved: $G$ has a forced zero region; the positions that occur in a nonzero
transversal are decomposed into square blocks determined by $Y$,
and the rest of $G$ can be filled in arbitrarily without influencing
$\det G$.

\medskip
The block with rows indexed by $\{ (h,i) \in Y \mid h \in R\}$
and columns indexed by $\{ (h,s+1-i) \in Y \mid h \in R \}$ (for fixed $i$)
is symmetric: $g((h,i),(h',s+1-i)) = g((h',i),(h,s+1-i))$.
Moreover, this block is the same for fixed $R$ and all $i$.

(Indeed, $g((h,i),(h',s+1-i)) = g((h,i'),(h',s+1-i'))$.)

\medskip
Finally, in the free part, some positions must equal other positions,
again because of $g(Ny,z) = g(y,Nz)$.

\medskip
\newcommand{\barx}[1]{\multicolumn{1}{|c}{#1}}
\newcommand{\xbar}[1]{\multicolumn{1}{c|}{#1}}
\newcommand{\barzero}{\barx{0}}
\newcommand{\barxbar}[1]{\multicolumn{1}{|c|}{#1}}
\newcommand{\barzerobar}{\barxbar{0}}
\newcommand{\barstarbar}{\barxbar{*}}
%
Example: Let $Y = {\Young(1,5,8|2,6|3,7|4)}$. We find
$G = $ {\scriptsize $\left[
\begin{array}{cccccccc}
\cline{8-8}
0 & 0 & 0 & 0 & 0 & 0 & 0 & \barxbar{a} \\
\cline{6-8}
0 & 0 & 0 & 0 & 0 & \barx{b} & \xbar{c} & . \\
0 & 0 & 0 & 0 & 0 & \barx{c} & \xbar{d} & . \\
\cline{4-4}\cline{6-7}
0 & 0 & 0 & \barx{e} & \barzero & . & . & . \\
\cline{4-5}
0 & 0 & 0 & 0 & \barxbar{a} & . & . & . \\
\cline{2-3}\cline{5-5}
0 & \barx{b} & \xbar{c} & . & . & . & . & . \\
0 & \barx{c} & \xbar{d} & . & . & . & . & . \\
\cline{1-3}
\barxbar{a} & . & . & . & . & . & . & . \\
\cline{1-1}
\end{array} \rule{0pt}{40pt} \right]$},
where $a = g(u_1,u_8) = g(u_5,u_5) = g(u_8,u_1)$, etc.

% \subsection*{Reformulation}
% Let $g$ be a symmetric bilinear form for which a fixed nilpotent
% map $N$ of shape $Y$ is self-adjoint.
% Let $B = \{u_1,\ldots,u_n\}$ be a basis that fits $N$
% and identify the $u_i$ with squares in $Y$, so that $N$ acts
% via left shift. Let $R$ be a row group consisting of $r$ rows of length $s$.
% Let $W$ be the span of the basis vectors $\{ (h,s) \in Y \mid h \in R\}$.
% Then $(u,v)_R := g(u,N^{s-1}v)$ defines a nondegenerate symmetric
% bilinear form on $W$.
% This is somewhat similar to e.g. \cite[(5.1.11)]{CM}.

\subsection{Number of forms for which $N$ is self-adjoint}
Let $g(Y) := g_s(Y)$ be the number of nondegenerate symmetric bilinear forms
for which a fixed nilpotent map $N$ of shape $Y$ is self-adjoint.

\medskip
Computation of $g(Y)$:
Let $g$ be one of the counted forms. Above we found the structure of $G$.
There is a forced zero region: no choice.
For each row group $R$ there is a series of nonsingular symmetric blocks
of order $r$, where $r = |R|$, all equal. The number of choices (for each $R$)
is the number $g_s(r)$ of nonsingular symmetric matrices of order $r$,
that is $q^{t(t+1)}[1][3]\ldots [r-1]$ if $r = 2t$, and
$q^{t(t+1)}[1][3]\ldots [r]$ if $r = 2t+1$. Having chosen these,
all remaining entries that do not have to be zero, can be chosen arbitrarily
(but symmetrically), still subject to $g(Nu_i,u_j) = g(u_i,Nu_j)$.
This means that we can choose the inner product of the final element
of each row of $Y$ with the noninitial squares in the same row or
subsequent rows in the same row group,
and with all squares in subsequent row groups.

\medskip
For example, in $Y = {\smallsquares\Young(,,|,|,)}$ there are two row groups,
one of one row that gives a factor $[1]$, and one of two rows that gives
a factor $q^2[1]$, and $6+2+1 = 9$ inner products that can be chosen freely,
for a total of $g(Y) = [1]^2q^{11}$.

For example, in $Y = {\smallsquares\Young(,|,|||)}$ there are two row groups,
one of two rows that gives a factor $q^2[1]$, and one of three rows
that gives a factor $q^2[1][3]$, and $5+4=9$ inner products
that can be chosen freely, for a total of $g(Y) = [1]^2[3]q^{13}$.


\subsection{Counting self-adjoint nilpotent matrices of given shape}\label{givenshape}
Let $N_s(Y)$ be the number of symmetric nilpotent matrices with shape $Y$.
Let $N_0(Y)$, $N_1(Y)$, $N_e(Y)$, $N_h(Y)$ be the number of
nilpotent maps of shape $Y$ that are self-adjoint with respect to
a fixed nondegenerate symplectic (standard, elliptic, hyperbolic)
symmetric bilinear form.

Then for $n=2m+1$ we have
$$N_s(Y) = N(Y) \frac{g_s(Y)}{g_s} =
[2][4]\ldots [2m] \, q^{m^2} \frac{g(Y)}{f(Y)} .$$

For $n=2m$, and $q$ even, we have
$$N_0(Y) = N(Y) \frac{g_0(Y)}{g_0}~~~{\rm and}~~~
N_1(Y) = N(Y) \frac{g_1(Y)}{g_1}.$$
% Since $N(Y) = [1][2]\ldots [n]q^{n(n-1)/2}/f(Y)$,
% we see
% $N_0(Y) = [2][4]\ldots [2m]q^{m^2} g_0(Y)/f(Y)$
% and
% $N_1(Y) = [2][4]\ldots [2m-2]q^{m^2} g_1(Y)/f(Y)$
% (so that $N_1(Y)g_0(Y) = N_0(Y) g_1(Y)/[2m]$).

For $n=2m$, and $q$ odd, we have
$$N_e(Y) = N(Y) \frac{g_e(Y)}{g_e}~~~{\rm and}~~~
N_h(Y) = N(Y) \frac{g_h(Y)}{g_h}.$$

Let $N_s$, $N_0$, $N_1$, $N_e$, $N_h$ be the totals
(defined by $N_x = \sum_Y N_x(Y)$ for $x \in \{s,0,1,e,h\}$).

\begin{Proposition}\label{propav}
The functions $N_x(Y)$ and totals $N_x$ are polynomials in $q$.
For even $n$ these polynomials are related by
$N_e(Y)+N_h(Y) = 2N_1(Y)$ for all $Y$,
and (hence) $N_e+N_h = 2N_1$.
\end{Proposition}

\Proof
That the $N_x(Y)$ are polynomials is clear, e.g. from the expressions
given and the fact that their values for prime powers $q$ must be integral.
Let $n = 2m$.
We have to show that $$(g_e(Y) / g_e) + (g_h(Y) / g_h) =
2 (g_1(Y) / g_1).$$ Multiply by
$(q^m+1)g_e = (q^m-1)g_h = \half  q^m g_1$ to turn this into
$$(q^m+1) g_e(Y) + (q^m-1) g_h(Y) = q^m g_1(Y).$$
Since $g_e(Y)+g_h(Y) = g_s(Y) = g_0(Y)+g_1(Y)$
(both equalities give the total number of forms as the sum of the
two types of forms; the LHS has geometric meaning for odd $q$,
the RHS for even $q$, but the equality is valid for all $q$)
this is equivalent to $$g_h(Y) - g_e(Y) = q^m g_0(Y).$$

Each of $g_e(Y)$, $g_h(Y)$, $g_0(Y)$ counts nondegenerate symmetric
bilinear forms $g$, and the earlier theory gives a block structure
for the Gram matrix $G$. All blocks that are not diagonal blocks
(principal submatrices) occur in pairs, so do not influence whether
$\det G$ is a square. Also, they do not meet the diagonal, so do not
influence whether the form will be symplectic. Since they contribute the same
factor to each of $g_e(Y)$, $g_h(Y)$, $g_0(Y)$, they can be ignored.

Similarly, we can ignore the free factors $q$ for off-diagonal elements
that are not forced to equal diagonal elements. They contribute the
same power of $q$ to each of $g_e(Y)$, $g_h(Y)$, $g_0(Y)$.
It remains to consider the diagonal blocks and further diagonal elements.

If $Y$ has a diagonal block of odd size,
then $g_0(Y) = 0$ since it cannot be nonsingular and
symmetric with zero diagonal. And $g_h(Y) = g_e(Y)$
since we can multiply all entries in the diagonal block
by the same nonsquare and change the quadratic character of $\det G$.

Otherwise, if there are no diagonal blocks, then the
determinant is $(-1)^m$ times a square, and the form
is hyperbolic. Requiring a zero diagonal costs $m$ factors $q$
(since the other $m$ diagonal entries were zero already).
So we are done in this case.

If there is a single diagonal block, say of size $2t$, then
we find $g_e(Y) = g_e(2t)C$ and $g_h(Y) = g_h(2t)C$ and
$q^m g_0(Y) = q^t g_0(2t)C$, where $C$ is the product of common factors.
Now $g_h(2t)-g_e(2t) = q^{t^2}[1][3]\ldots [2t-1] = q^t g_0(2t)$,
as desired.

For the general case, note that different diagonal blocks
correspond to mutually orthogonal subspaces (for any of the forms counted)
and both $g_h-g_e$ and $q^{n/2} g_0$ are multiplicative
(for taking orthogonal direct sums).
\qed

\section{A mysterious equality}\label{mystery}
Let $V$ be a vector space over $\Ff_q$ of dimension $n=2m+1$,
provided with a nondegenerate symmetric bilinear form $g$.
For both odd and even $q$ we have the following.

\begin{Proposition}\label{myst}
The number of $g$-selfadjoint nilpotent linear transformations $N$ on $V$
equals the number of pairs $(N,x)$ with $N$ as before, and $x$ a
nonisotropic projective point such that $Nx=0$.
\end{Proposition}
%
\Proof
Let $N$ be nilpotent and self-adjoint w.r.t. $g$. Then
$${\rm rad~} \kerx N = \kerx N \cap \imgx N.$$
Indeed, if $u \in \kerx N$ and $v \in \imgx N$,
that is, if $Nu = 0$ and $v = Nw$, then
$g(u,v) = g(u,Nw) = g(Nu,w) = 0$. It follows that $\kerx N$
is orthogonal to $\imgx N$, and that
$\kerx N \cap \imgx N \subseteq {\rm rad~} \kerx N
\subseteq (\kerx N + \imgx N)^\perp$.
But $\dim ((\kerx N + \imgx N)^\perp) =
n - \dim (\kerx N + \imgx N) = \dim (\kerx N \cap \imgx N)$,
so equality holds.

Let $S := \kerx N / (\kerx N \cap \imgx N)$.
Let $d = \dim \kerx N$, and $e = \dim S$.
We find that the number of nonisotropic points $x$ of $\kerx N$
is $q^{d-e}$ times the number of nonisotropic points of $S$.
For odd $e$ that is $q^{d-e} \cdot q^{e-1} = q^{d-1}$.
For even $e$, the number is not constant, since $S$ can be
hyperbolic or elliptic (for odd $q$) or standard or symplectic (for even $q$).
Define
$$
[e]' = \left\{ \begin{array}{ll}
[e] & {\rm if}~e~{\rm is~odd},\\
q^e & {\rm if}~e~{\rm is~even}.
\end{array}\right.~~~
[e]'' = \left\{ \begin{array}{ll}
q^e & {\rm if}~e~{\rm is~odd},\\
{}[e] & {\rm if}~e~{\rm is~even}.
\end{array}\right.
$$
so that $[e]' [e]'' = q^e [e]$.
We show that our claim is equivalent to
$$
\begin{array}{l}
\sum_N 1 = \sum_N q^{d-e-1} [e]'' ,
\end{array}
$$
where the sum is over self-adjoint nilpotent $N$ (and $d,e$ depend on $N$).
Indeed, since there is up to isomorphism a unique form $g$,
we can average over all forms $g$ for which $N$ is self-adjoint.
Note that $S$, $d$, $e$ do not depend on the choice of $g$.
We already checked the case where $e$ is odd, so let $e$ be even, say $e=2t$.

First suppose that $q$ is odd.
On the $e$-space $S$ the various forms $g$ induce
$g_e(2t) = \half q^{t^2}[1][3]\ldots[2t-1](q^t-1)$ elliptic
and $g_h(2t) = \half q^{t^2}[1][3]\ldots[2t-1](q^t+1)$ hyperbolic
forms, with respectively $\frac{q^{2t-1}-1}{q-1} - q^{t-1}$
and $\frac{q^{2t-1}-1}{q-1} + q^{t-1}$ isotropic points,
for an average of $\frac{q^{2t-1}-1}{q-1} + \frac{1}{q}$
isotropic points, and $q^{2t-1} - \frac{1}{q} = \frac{1}{q}(q^e-1)$
nonisotropic points, as claimed.

Now suppose that $q$ is even.
On the $e$-space $S$ the various forms $g$ induce
$g_0(2t) = q^{-2t} g_s(2t)$ symplectic and
$g_1(2t) = (q^{2t}-1) g_0(2t)$ standard forms,
with respectively $\frac{q^{2t}-1}{q-1}$ and $\frac{q^{2t-1}-1}{q-1}$
isotropic points, with the same average as before.

\bigskip
Define a map $Y \mapsto Y'$ on Young diagrams (with odd $n$) as follows:
find in $Y$ the rightmost column with an odd number of squares,
remove the bottom square from this column, and add it as a new row
of length one at the bottom of the diagram.
For example, the three diagrams here on the left all map to the
diagram on the right.

$$
{\smallsquares\Young(,,,,*|,,,|,,|,,|,)},~~~
{\smallsquares\Young(,,,|,,,|,,,*|,,|,)}\,,~~~
{\smallsquares\Young(,,,|,,,|,,|,,|,,*)}~~\mapsto~~
{\smallsquares\Young(,,,|,,,|,,|,,|,|*)}.
$$

It may be that $Y' = Y$, namely when the only odd column is the first one.
For example, the three diagrams here on the left all map to the
diagram on the right.

$$
{\smallsquares\Young(,,*|,||)},~~~
{\smallsquares\Young(,|,|,*|)}\,,~~~
{\smallsquares\Young(,|,|||*)}~~\mapsto~~
{\smallsquares\Young(,|,|||*)}.
$$

Our claim will now follow from
$$
\sum_Y N_s(Y) = q^{d-e-1} [e]'' N_s(Y_0)
$$
for each Young diagram $Y_0$ (with $d$ rows, among which $e$ of length 1),
where the sum is over the $Y$ with $Y' = Y_0$.
% Note that $[0]'' = 0$.
We saw that $N_s(Y) = [2][4]\ldots[2m]q^{m^2} \frac{g(Y)}{f(Y)}$, so have
to show that $\sum_Y \frac{g(Y)f(Y_0)}{g(Y_0)f(Y)} = q^{d-e-1} [e]''$.
Suppose the square moved in $Y$ was at row $s$ column $t$.
Consulting the computation of $f(Y)$ and $g(Y)$, we see for $Y \ne Y_0$ that
$$\frac{f(Y_0)}{f(Y)} = \frac{[e][b]}{[c+1]} q^{2d-e-h-i-1}$$
and
$$\frac{g(Y)}{g(Y_0)} = \frac{[c+1]}{[e]'[b]'} q^{b+e+h-d}$$
where $b \ge 1$ is the size of the row group of $Y_0$ containing the row
of the square that was removed in $Y$ (with rows of length $t-1$),
and $c \ge 0$ is the size of the row group of $Y_0$ with rows of length $t$,
and $h \ge 0$ is the number of elements (in $Y$ or in $Y_0$) in column $t+1$,
that is, the number of rows (in $Y$ or in $Y_0$) with length larger than $t$,
and $i \ge 0$ is the number of elements (in $Y$) in column $t-1$.

If $[e]'' = 0$, that is, if $Y_0$ has no row of length 1,
there are no $Y$ with $Y' = Y_0$, and we are done. Otherwise,
we have to show that
$$
\sum_Y [b]''q^{-i} = \left\{
\begin{array}{ll}
1 & {\rm if}~Y_0' \ne Y_0 \\
1 - (q^{d-e-1}[e]'')^{-1} & {\rm if}~Y_0' = Y_0,
\end{array}\right.
$$
where the sum is over the $Y$ with $Y \ne Y_0$ and $Y' = Y_0$.
If the LHS is empty, then $Y_0 = {\smallsquares\Young()} = Y_0'$
and $d=e=1$ and $[e]''=q$, and both sides are zero.
Otherwise, let $Y$ be the diagram with highest possible
moving square (on the top row). If (its) $b$ is odd,
then the LHS has one term only, $i = b$, and $Y_0' \ne Y_0$,
so that both sides are one.
If $b$ is even, then again $i = b$, and now $[b]''q^{-i} = 1-q^{-b}$.
Now remove the first $b$ rows from all $Y$ and from $Y_0$
(so that $d$ and all $i$ are decreased by $b$), and apply induction.
\qed

\medskip
Now, let $V$ be a vector space over $\Ff_q$ of dimension $n=2m > 0$,
provided with a standard bilinear form $g$.
For even $q$ we prove the analog of Proposition \ref{myst}.
We use the Fitting decomposition and induction.

\medskip
The Fitting decomposition shows that
$q^{\frac12n(n+1)} = \sum_M 1 = \sum_U N(U) S(U^\perp)$ %,
where the sum is over self-adjoint $M$,
nondegenerate subspaces $U$ of $V$, and $N(U)$
is the number of self-adjoint nilpotent maps on $U$,
and $S(W)$ is the number of self-adjoint invertible maps on $W$.
We want to refine this equality.

\medskip
First a lemma. Recall that in the present case ($q$ even, $n$ even,
standard form) the isotropic points are precisely the points in $\1^\perp$.
The subspace $\1^\perp$ is symplectic, with radical $\langle \1 \rangle$.

\begin{Lemma}
$\sum_U N(U) S(U^\perp) = q^{\frac12n(n+1)-1} (q-1)$,
where the sum is over the nondegenerate subspaces $U$ of $\1^\perp$.
\end{Lemma}
%
\Proof
Put $a_s := |Sp(2s,q)| = q^{s^2} \prod_{i=1}^m [2i]$.
A nondegenerate symplectic $2s$-space has
$a_s/a_ha_{s-h} = q^{2h(s-h)} \prod_{i=0}^{h-1} [2s-2i] / \prod_{i=1}^h [2i]$
nondegenerate subspaces of dimension $2h$.

Let $\dim U = 2h$. Then $N(U) = q^{2h^2}$.
The space $\1^\perp / \langle \1 \rangle$ is a nondegenerate
symplectic $(2m-2)$-space, and each nondegenerate $2h$-space
in that quotient lifts to $q^{2h}$ nondegenerate $2h$-spaces $U$
in $\1^\perp$, so that the number of terms with $\dim U = 2h$ equals
$q^{2h(m-h)} \prod_{i=0}^{h-1} [2m-2i-2] / \prod_{i=1}^h [2i]$.
Finally, $S(U^\perp) = g_s(2m-2h) = q^{(m-h)(m-h+1)} \prod_{j=1}^{m-h} [2j-1]$.
We see that our claim is equivalent to
$$
\sum_{h=0}^{m-1} q^{2h(m-1)}
\frac{ \prod_{i=0}^{h-1} (1-q^{-2m+2+2i}) }{ \prod_{i=1}^h (1-q^{2i}) }
\prod_{j=1}^{m-h-1} (1-q^{2j+1}) = (-1)^{m-1} q^{m^2-1}.
$$
Let $(a;q)_n = \prod_{i=0}^{n-1} (1-aq^i)$.
A simple computation shows that
$$\sum_{h=0}^{m-1} q^{h(m-1)} (q^{1-m};q)_h (q^\frac{3}{2};q)_{m-h-1}
 / (q;q)_h = (-1)^{m-1} q^{(m^2-1)/2}.$$
(For example, this is suitable as input for the Maple {\tt qzeil} function.)\\
Since this is our equation with $q^2$ replaced by $q$, we are done.
\qed

\begin{Proposition}\label{myst2}
The number of $g$-selfadjoint nilpotent linear transformations $N$ on $V$
equals the number of pairs $(N,x)$ with $N$ as before, and $x$ a
nonisotropic projective point such that $Nx=0$.
\end{Proposition}
%
(Yes, this says the same as Proposition \ref{myst}, but this time
$n = 2m$, $q$ is even, and the form is not symplectic.)

\medskip\noindent\Proof
We show by induction on $n$ that $N(V) = \sum_N 1 = \sum_{N,x} 1$,
where the sum is over nilpotent self-adjoint $N$
and nonisotropic $x$ in the kernel of $N$.
This was shown above for odd $n$ and all $q$. Here we settle
the case of even $n$ and even $q$, using the above result
for odd $n$ and even $q$.

Our claim is equivalent to $\sum_U N(U) S(U^\perp) = \sum_{U,N,x} S(U^\perp)$,
where $U$ runs over all nondegenerate subspaces of $V$ containing
a nonisotropic point (that is, all nondegenerate subspaces not
contained in $\1^\perp$), and $N$ over the self-adjoint nilpotent maps
on $U$, and $x$ over the nonisotropic points in $U$ with $Nx = 0$.
(Indeed, by induction we have termwise equality for all proper
subspaces $U$ of $V$, and $N(V)$ is multiplied by $S(V^\perp) = S(0) = 1$.)

Since $\sum_U N(U) S(U^\perp) = q^{\frac12n(n+1)}$,
the lemma gives
$\sum_{U \not\subseteq \1^\perp} N(U) S(U^\perp) = q^{\frac12n(n+1)-1}$.
Hence, our claim is equivalent to $\sum_{U,N,x} S(U^\perp) =
q^{\frac12n(n+1)-1}$.

Using the Fitting decomposition of $M$, we see
$\sum_{M,x} 1 = \sum_{U,N,x} S(U^\perp)$ %,
where the left-hand sum is over the self-adjoint $M$
and nonisotropic $x$ with $Mx = 0$.
%
The number of nonisotropic projective points in $V$ is $q^{n-1}$
(all points outside the hyperplane $\1^\perp$).
%
Given a nonisotropic point $x$, the number of self-adjoint maps $M$
with $Mx = 0$ is $q^{-n}$ times the total number of self-adjoint maps $M$,
that is, is $q^{\frac12n(n-1)}$.
% wlog: x=e_1, and symmetric matrix of size n-1 is left.
% or: x gives a homegeneous linear system on entries of M.
It follows that $\sum_{M,x} 1 = q^{\frac12n(n+1)-1}$ as desired.
\qed

\section{Going down}
\begin{Proposition}\label{down1}
For odd $q$, let $N_a = (N_h+N_e)/2$ and $N_d = (N_h-N_e)/2$.
Then $N_s(2m+1) = q^{2m} N_a(2m) + q^m N_d(2m)$.
\end{Proposition}
%
\Proof
The claim says that
$$N_s(2m+1) = \half q^m(q^m+1) N_h(2m) + \half q^m(q^m-1) N_e(2m).$$
In a nondegenerate orthogonal geometry of (vector space) dimension $2m+1$
there are $\half q^m(q^m+1)$ nonisotropic projective points $x$
such that $x^\perp$ is hyperbolic, and $\half q^m(q^m-1)$ nonisotropic
projective points $x$ such that $x^\perp$ is elliptic.
(This is well known, and easy to prove: Count pairs $(x,z)$
of projective points, with $x$ nonisotropic and $z$ isotropic,
and $g(x,z) = 0$. There are $(q^{2m}-1)/(q-1)$ choices for $z$,
and given $z$ there are $q^{2m-1}$ choices for $x$. Conversely,
if we choose $x$ first, and $x^\perp$ is hyperbolic for $h$ choices of $x$,
and elliptic for $e$ choices of $x$, then $h+e = q^{2m}$ and
$h(\frac{q^{2m-1}-1}{q-1} + q^{m-1}) + e(\frac{q^{2m-1}-1}{q-1} - q^{m-1})
= q^{2m-1}(\frac{q^{2m}-1}{q-1})$ and we find the desired values for $h,e$.)

If $x$ is a nonisotropic point, then the self-adjoint nilpotent
maps $N$ for which $Nx = 0$ preserve $x^\perp$, and hence are
in 1-1 correspondence with the self-adjoint nilpotent maps
on $x^\perp$. Our claim can be reformulated as
$$
\begin{array}{l}
\#\{ N \mid N~\hbox{\rm self-adjoint,~nilpotent} \} = \\
\quad\quad\#\{ (N,x) \mid N~\hbox{\rm self-adjoint,~nilpotent},~
Nx=0,~g(x,x) \ne 0 \}
\end{array}
$$
for a vector space $V$ of dimension $2m+1$ over $\Ff_q$ for odd $q$,
provided with a nondegenerate symmetric bilinear form $g$.
But this is precisely the statement of Proposition \ref{myst}. \qed

\begin{Proposition}\label{down2}
Let $q$ be even. Then
$N_s(2m+1) = (q^{2m}-1) N_1(2m) + N_0(2m)$.
\end{Proposition}
%
\Proof
Again apply Proposition \ref{myst}, noting that there are $q^{2m}$
nonisotropic points, precisely one of which has a symplectic perp.
\qed

\begin{Proposition}\label{down3}
Let $q$ be even. Then
$N_1(2m) = q^{2m-1} N_s(2m-1)$.
\end{Proposition}
%
\Proof\kern -0.4pt
Apply Proposition \ref{myst2}, noting that there are $q^{2m-1}$
nonisotropic points.
\qed

\section*{Summary}
In the introduction we used $e(2m), h(2m), p(2m+1), z(2m), s(2m), s(2m+1)$
for what we later called $N_e, N_h, N_s, N_0, N_1, N_s$, respectively.
Proposition \ref{propav} proves Propositions \ref{res1}, \ref{res3}
and \ref{res4}.
Theorem \ref{steinberg} proves Proposition \ref{res2}.
Propositions \ref{down1}, \ref{down2} and \ref{down3} prove
Propositions \ref{res5}, \ref{res6} and \ref{res7}.
Corollary \ref{res8} follows, and Proposition \ref{res8}
says that the standard form is elliptic only when $n \equiv 2$ (mod 4)
and $q \equiv 3$ (mod 4), which we remarked in the intro of \S\ref{forms}.
Finally, Proposition \ref{res10} is proved in \S\ref{mystery}.

\section{Ranks and exponents}
From the Young diagram $Y$ of a nilpotent map $N$ one can read off
its rank ($n$ minus the number of rows) and exponent (the number of
columns). By summing not over all $Y$ but over the $Y$ with a given
number of rows or columns, one obtains results for the number of
self-adjoint nilpotent matrices of a given rank or exponent.

We have precise conjectures for the values $e(2m,r)$, $h(2m,r)$ etc.
that count self-adjoint nilpotent matrices of a given rank $r$.
See \cite{B}.

Concerning the case of a given exponent,
let $E_s(n,e)$ be the number of symmetric nilpotent matrices
of order $n$ and exponent $e$. Then $E_s(n,n) = N_s(Y)$ for
$Y$ a single row like ${\smallsquares\Young(,,,,,,)}$,
which we determined in \S\ref{givenshape}.
For small $i$, the function $E_s(n,n-i)$ has simple behaviour.

\begin{Lemma}

(i) If $n = 2m+1$, then $E_s(n,n) = [2][4]\ldots [2m] \, q^{m^2}$.

(ii) For $n$ odd, $n > 2i$, the ratio $E_s(n,n-i)/E_s(n,n)$ is
independent of $n$.
\end{Lemma}

\Proof
Let $n$ be odd.
We saw in \S\ref{givenshape} that
$N_s(Y) = [2][4]\ldots [2m] \, q^{m^2} \frac{g(Y)}{f(Y)}$.

(i) For $Y$ a single row, we have $f(Y) = [1] q^{n-1} = g(Y)$.

(ii)
The ratio $E_s(n,n-i)/E_s(n,n)$ is $\sum_Y \frac{g(Y)}{f(Y)}$
where the sum is over the $Y$ with $n-i$ columns.
If $Y$ has a unique longest row, and $Y'$ is obtained from $Y$
by adding two squares at the end of the first row, then $Y$ and $Y'$
have the same row groups, and $f(Y') = q^2 f(Y)$ and $g(Y') = q^2 g(Y)$
so that $g(Y')/f(Y') = g(Y)/f(Y)$.
More generally, if the row group containing the longest row in $Y$
has odd size $2t+1$, then $f(Y') = q^{2t+2} [1] f(Y) / [2t+1]$ and
$g(Y') = q^{2t+2} [1] g(Y) / [2t+1]$ and again $g(Y')/f(Y') = g(Y)/f(Y)$.
\qed

\section*{Appendix}
We give $e(2m), h(2m), z(2m), s(2m)=a(2m), s(2m+1)=p(2m+1)$ for $m \le 2$.

\medskip
\begin{tabular}{c|ccccc}
$m$ & 0 & 1 & 2 \\
\hline
$z(2m)$ & 1 & $q^2$ & $q^8$ \\
$s(2m)$ & 1 & $q$ & $q^6+q^5-q^4$ \\
$e(2m)$ & 1 & 1 & $q^5+q^3-q^2$ \\
$h(2m)$ & 1 & $2q-1$ & $2q^6+q^5-2q^4-q^3+q^2$ \\
$p(2m+1)$ & 1 & $q^3+q^2-q$ & $q^{10}+q^9-q^6-q^5+q^4$
\end{tabular}

\begin{thebibliography}{99}
\bibitem{Albert}
A. A. Albert,
{\it Symmetric and alternate matrices in an arbitrary field},
Trans. Amer. Math. Soc. {\bf 43} (1938) 386--436.

\bibitem{B}
A. E. Brouwer,
{\tt\verb%http://www.win.tue.nl/~aeb/math/symnilp.html%}.

\bibitem{BCN}
A. E. Brouwer, A. M. Cohen \& A. Neumaier,
{\it Distance-regular graphs}, Springer, Heidelberg, 1989.

% \bibitem{CM}
% D. H. Collingwood \& W. M. McGovern,
% {\it Nilpotent orbits in semisimple Lie algebras},
% Van Nostrand Reinhold, New York, 1993.

\bibitem{Cr}
M. C. Crabb,
{\it Counting nilpotent endomorphisms},
Finite Fields Appl. {\bf 12} (2006) 151--154.

\bibitem{FH} 
N. J. Fine \& I. N. Herstein,
{\it The probability that a matrix be nilpotent},
Illinois J. Math. {\bf 2} (1958) 499--504.

\bibitem{Ge}
M. Gerstenhaber,
{\it On the number of nilpotent matrices with coefficients
in a finite field},
Illinois J. Math. {\bf 5} (1961) 330--333.

\bibitem{Hall}
Philip Hall,
{\it Lectures by Philip Hall, St Andrews colloquium, 13--23 July, 1955},
transcribed by Clara Murray.

% \bibitem{Hu}
% J. E. Humphreys,
% {\it Conjugacy Classes in Semisimple Algebraic Groups},
% Mathematical Surveys and Monographs 43, AMS, Providence, Rhole Island, 1995.

\bibitem{Lusztig}
G. Lusztig,
{\it A note on counting nilpotent matrices of fixed rank},
Bull. London Math. Soc. {\bf 8} (1976) 77--80.

\bibitem{Spr}
T. A. Springer,
{\it The Steinberg function of a finite Lie algebra},
Inventiones Math. {\bf 58} (1980) 211--215.

\bibitem{St}
Robert Steinberg,
{\it Endomorphisms of linear algebraic groups},
Memoirs of the American Mathematical Society, vol. 80,
AMS, Providence, R.I., 1968.

% \bibitem{Wall}
% G. E. Wall,
% {\it On the conjugacy classes in the unitary, symplectic and
% orthogonal groups},
% J. Austral. Math. Soc. {\bf 3} (1963) 1--62.

% \bibitem{Wan}
% Zhe-xian Wan,
% {\it Geometry of classical groups over finite fields},
% Studentlitteratur, Lund, 1993.

\end{thebibliography}

\end{document}
