In a (right) finite dimensional quaternionic Hilbert space there is an analogue of the [spectral theorem](https://core.ac.uk/download/pdf/82151498.pdf) (see theorem 4.6 in Farenick and Pidkowich) for normal matrices in $\mathbb{H}^{m\times m}$, allowing for a convenient notion of rank of a normal matrix over quaternions (the number of positive singular values). Further one can also map matrices over quaternions to matrices over complex numbers of twice the dimension by use of symplectic representations. Vectors have images under the $\*$-homomorphism, $\Psi:\mathbb{H}^m\rightarrow \mathbb{C}^{2m}$ given by $$\xi=\xi\_{1}+\xi\_{2}j \mapsto \begin{pmatrix} \ \ \xi\_{1} \\ -\overline{\xi\_{2}}\end{pmatrix},$$ where $\xi\_{1},\xi\_{2}$ are complex quaternions (that is, with zero $j$ and $k$ parts), and the image of (right) linearly independent vectors over $\mathbb{H}$ remain linearly independent over $\mathbb{C}$ under this mapping. Further for matrices over quaternions the mapping $\Phi:\mathbb{H}^{m\times m}\rightarrow\mathbb{C}^{2m\times 2m}$ $$\Gamma\_{1}+\Gamma\_{2}j\mapsto \begin{pmatrix} \Gamma\_{1} & \Gamma\_{2} \\ -\overline{\Gamma\_{2}} & \overline{\Gamma\_{1}} \end{pmatrix}$$ the rank of the image under $\Phi$ of a matrix is doubled.


Without taking consideration the form of matrices in the image of $\Phi$, the set of $2m\times 2m$ matrices of rank at most $2k$ over $\mathbb{C}$ is an irreducible projective algebraic variety of co-dimension $4(m−k)^2$. Is there a way to meaningfully say something about the dimension of the space of hermitian $m\times m$ matrices over quaternions with rank less than or equal to $k$? 


Quaternions being non-commutative means that the condition of all size $k+1$ minors vanishing which can define a rank at most $k$ matrix over $\mathbb{C}$ is not handled similarly for $\mathbb{H}$, with the closest thing resembling being 'quasideterminants' (see the [paper](https://arxiv.org/abs/math/0208146) by Gelfand et al from 2002 ). Does this question make sense in non-commutative algebraic geometry, or is it more natural to come from another perspective? 



Dimension of hermitian rank at most $k$ matrices over quaternions
Let $E$ be the space of hermitian matrices of size $m$ with quaternionic coefficients. This a $\mathbb{R}$-vector space of real dimension $4m(m-1)/2 + m = m(2m-1)$. For any $A \in E$, define the (right) kernel of $A$ : this is the subset of $\mathbb{H}^m$ defined by the condition $A \times x = 0\_{\mathbb{H}^m}$. Since quaternionic multiplication is associative, we see that $\mathrm{Ker}(A)$ is a finitely generated right $\mathbb{H}$-module. Now, any finitely generated module over a division ring is a free module (same proof as in the case of a field), so that one can defined the (quaternionic)-rank of $A$ as the codimension of its kernel in $\mathbb{H}^n$. 


Denote by $E\_{k}$ the set of matrices in $E$ which have (quaternionic)-rank less or equal to $k$. Write:
$$F\_{k} = \{(L,A), \ A \in E\_{k}, L \in \mathrm{Gr}(m-k,\mathbb{H}^{m}), \ \textrm{such that} \ L \subset \mathrm{Ker}(A) \}.$$


There is an obvious projection map $p\_{k} : F\_{k} \longrightarrow E\_{k}$ which is birationnal (this map is a local isomorphism onto the matrices which have rank $k$). Let's prove that $F\_{k}$ is smooth and connected, so that $E\_{k}$ is irreducible and the map $p\_{k} : F\_{k} \longrightarrow E\_{k}$ is a resolution of singularities.


We consider the projection map $q\_{k} : F\_{k} \longrightarrow \mathrm{Gr}(m-k, \mathbb{H}^{m})$. Let $L \in \mathrm{Gr}(m-k, \mathbb{H}^{m})$. We have:


$$q^{-1}(L) = \{A \in E, \ \textrm{such that} \ A(L) = 0\}.$$
Since $A$ is hermitian, the (quaternionic) image of $A$ (which is equally a sub-free-right-module of $\mathbb{H}^m$) is orthogonal to $\mathrm{Ker}(A)$ for the $\mathbb{R}$-valued hermitian form on $\mathbb{H}^{m}$:


$$\sigma : (a\_1, \ldots, a\_{m});(b\_1,\ldots,b\_{m}) \longrightarrow \mathrm{Re}(a\_1\overline{b\_1} + \ldots + a\_{m} \overline{b\_{m}}),$$
where $\mathrm{Re}(.)$ is the real part of a quaternion.


We deduce that $q^{-1}(L)$ identifies with the $\mathbb{R}$-vector space of hermitian $\mathbb{H}$-linear maps $\mathbb{H}^m/L \longrightarrow \mathbb{H}^m/L$. This is a $\mathbb{R}$-vector space of dimension $4k(k-1)/2+k = k(2k-1)$.


As a consequence, the map $q : F\_k \longrightarrow \mathrm{Gr}(m-k,\mathbb{H}^m)$ is a (real)-vector bundle of real relative dimension $k(2k-1)$. I suspect that $\mathrm{Gr}(m-k, \mathbb{H}^m)$ is a real variety of real dimension $4k(m-k)$. So all, in all, if I haven't made any stupid mistake, we should get that $E\_k$ is a real irreducible variety of real dimension $4k(m-k) + k(2k-1)$.


In the special case $m=3$, this formula gives $\dim E\_3 = 15$, $\dim E\_2 = 14$, $\dim E\_1 = 9$, which is correct. Indeed, in the case $m=3$, we know that $E\_1$ is the cone over $\mathrm{Gr}(2,6)$ in its Pl\¨ucker embedding, $E\_2$ is the cone over its secant variety (which is a cubic hypersurface) and $E\_3$ is the ambient space.


