Dimension of the solution space to the equation $I J = 0$ Suppose $W = \mathbb{R}^{d_W}$ and $V = \mathbb{R}^{d_V}$ are the some vector spaces, and there are maps $I : W \rightarrow V$ and $J : V \rightarrow W$.
I would like to find the dimension of the space of solutions to the equation:
$$
I J = 0 \leftrightarrow I_{i j} J_{j k} = 0
$$
Without this constraint $\text{dim} \ I = \text{dim} \ \text{Hom} (W, V) = d_W d_V =  \text{dim} \ \text{Hom} (V, W) = \dim \ J$. Naively, this condition given one $d_V^2$ conditions, therefore one could think, that the answer would be:
$$
\max (2 d_W d_V - d_V^2, 0)
$$
But this seems to be wrong since equations are nonlinear and some of them can be dependent.
From the point of view of images and kernels, this means, that $\text{im} \ I \subset \text{ker} \ J$. And seems like a goal is to find all possible options, such that $J$ maps the input to some subspace of $W$, that is mapped to $0$ then, and count all possible such subspaces. But so far I have no idea how to do this.
I would strongly appreciate suggestions and ideas
 A: My algebraic geometry is a bit shaky, so any corrections are welcome. With that said, here's my "educated guess" of what the answer to this question should be.
Denote
$$
S = \{(I,J) \in \operatorname{Hom}(W,V) \times \operatorname{Hom}(V,W) : IJ = 0\},\\
S_k = \{(I,J) \in \operatorname{Hom}(W,V) \times \operatorname{Hom}(V,W) : IJ = 0 \text{ and } \dim \ker I = k\}.
$$
For any $k = 1,\dots,\dim(W)$, we can uniquely specify any element of $S_k$ as follows:

*

*Select a $k$-dimensional subspace $\mathcal I$ of $W$ to be the kernel of $I$. These subspaces form the $k \cdot (\dim W-k)$ dimensional manifold $Gr(W,k)$ (the Grassmannian).

*Select any map $J:V \to \mathcal I$. These maps form a linear space of dimension $\dim(V) \cdot k$

*Select any map $I$ with kernel $\mathcal I$ (or equivalently, any map $I:W/\mathcal I \to V$). These maps form a linear space of dimension $\dim(V) \cdot (
\dim(W) - k).$
Putting all this together, we find that $S_k$ is a variety of dimension
$$
[k(d_W-k)] \cdot [d_V \cdot k] \cdot [d_V \cdot (d_W-k)] = [d_Vk(d_W - k)]^2.
$$
The dimension of $S = \cup_{k=1}^{d_W} S_k$ at a generic point will be the maximum value of $\dim(S_k)$ over all $k$. Note that $k(d_W - k)$ attains its maximum value at $k = \lfloor d_W/2\rfloor$. Putting all this together, we find that the dimension of the variety at a generic point will be
$$
\dim(S) = \begin{cases}
[(d_W^2/4 - 1)d_V]^2 & d_W \text{ is odd},\\
\frac 14 d_W^2 d_V^2 & d_W \text{ is even}. 
\end{cases}
$$
Moreover, a "generic" pair $(I,J)$ will satisfy $\dim \ker I = d_W/2$ in the case that $d_W$ is even and $\dim \ker I \in \{(d_W \pm 1)/2\}$ in the case that $d_W$ is odd.
