Dimension of a space of matrices Let $m,n\in\mathbb{Z}$ and $r<\min$(m,n). Denote by $M$ the set of $m\times n $ matrices over a field $k$, and let $M_r$ be the subset of matrices of rank at least equal to $r$.
Now fix a matrix $A\in M_r$ and a subspace $W\in G(n-r,n)$ of dimension $n-r$ in $k^n$, such that $A\cdot W = 0$. Consider the set
$$ T= \left\{ B\in M \mid B\cdot W \subset A\cdot k^n  \right\}. $$
What is the easiest/more elegant way to see that $T$ has dimension $(n-r)(m-rank[A])$ ?
EDIT: $T$ doesn't have dimension, but CO-dimension $(n-r)(m-rank[A])$ inside $M$.
 A: That's not the answer I get.  Let's assume that the rank of $A$ is $r$.  Select a basis for $k^n$ such that $k^n\cong W_1\oplus V_1$, where $W_1=\operatorname{ker}(A)$ and $A$ restricted to $V_1$ is an isomorphism with the image of $A$.  Now select a basis for $k^m$ such that $k^m\cong W_2\oplus V_2$, where $V_2=\operatorname{Im}(A)$.  With respect to these bases, $A$ looks like
$$
\begin{pmatrix} 0 & 0\\ 0& A_{22} \end{pmatrix}
$$
where $A_{22}$ is an $r\times r$ block matrix with determinant nonzero.  Suppose we have the special case where $W=W_1$.  Then a $B$ satsifying what you want looks like
$$
\begin{pmatrix} 0 & B_{12}\\ B_{21} & B_{22} \end{pmatrix}.
$$
But, the dimension of the set of such matrices is $r(m-r)+r(n-r)+r^2$, which is not the same as $(n-r)(m-r)$.
EDIT: With the added information and the assumption the book is asking for the codimension of the subspace of matrices, here is an answer.  Everything is as above, but the rank of $A$ may not be $r$.  Thus $A_{22}$ will be a block matrix of size $s\times s$.  Adjust accordingly for $B_{12}$, $B_{21}$, and $B_{22}$.  Then the dimension we are looking for is the dimension of the block matrix $0$, which is exactly what is asked.
