## Number of matrices of a given rank satisfying this condition

### Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)

Let $A_1$ and $A_2$ be two arbitrary $n\times n$ matrices with entries in $Z_p$. How many $n\times n$ matrices $B$ are there so that both $A_1-B$ and $A_2-B$ are of rank $n-1$ or less? What is the formula if the rank is $n-k$ (for both $A_1-B$ and $A_2-B$)?

It is okay if I know a loose bound (but not trivial, of course). It looks like they are certainly less than $n^2.p^{n^2-k}$. Anything better would be really helpful.

Thanks!

-

## 2 Answers

$\def\rk{\mathop{\rm rank}}\def\ZZ{{\mathbb Z}}$ We need to estimate the number of expansions of the form $A:=A_1-A_2=C_1-C_2$ with $\rk C_i\leq n-k$ (then $B=A_1-C_1=A_2-C_2$). Since the multiplication by a non-degenerate matrix does not change anything, this depends only on $\rk A$.

Assume, for instance, that $A$ is non-degenerate. Fix two $(n-k)$-dimensional subspaces $V_1,V_2$ of the space of rows $V=\ZZ_p^n$ with $\dim V_i=n-k$; counting the bases, we obtain that there are there are $$N=\displaystyle \frac{(p^n-1)(p^n-p)\dots (p^n-p^{n-1})} {(p^{n-2k}-1)(p^{n-2k}-p)\dots(p^{n-2k}-p^{n-2k-1})\cdot \bigl((p^{n-k}-p^{n-2k})(p^{n-k}-p^{n-2k+1})\dots(p^{n-k}-p^{n-k-1})\bigr)^2}$$ such pairs of subspaces.

Denote by $C_i^j$ the $j$th row of $C_i$. Now let us count all the pairs $(C_1,C_2)$ such that $\mathop{\rm span} (C_i^1,\dots,C_i^n)\subseteq V_i$. Let $V'=V_1\cap V_2$. Then $C_i^j\mod V'$ is determined uniquely, hence we have $p^{n-2k}$ variants for each $C_1^j$, and $C_2$ is reconstructed from $C_1$. Thus we have $p^{n(n-2k)}$ pairs.

In total, we get $N\cdot p^{n(n-2k)}$ pairs. In fact, this is an upper bound, since the rank of $C_i$ may be less than $p-k$, and in this case one pair will correspond to several pairs $(V_1,V_2)$.

You may easily obtain a bound for $N$, but it would be better to know the relation between $p$ and $n$...

If $A$ is degenerate, then this bound should increase, since we just need $V_1+V_2$ to contain the space generated by the rows of $A$. On the other hand, we may restrict ourselves to the case when $(V_1+V_2)\mod V'=\mathop{\rm span}(A^1,\dots,A^n)\mod V'$.

-

### You can accept an answer to one of your own questions by clicking the check mark next to it. This awards 15 reputation points to the person who answered and 2 reputation points to you.

Thank you Ilya! This was very helpful!

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 46, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9524049758911133, "perplexity_flag": "head"}