4

This is a follow-up to this question: Probability that a random binary matrix is invertible?

The answer says that the probability of a random $\{0,1\}$, $n \times n$ matrix to be invertible is:

$$p(n)=\prod_{k=1}^{n}(1-2^{-k})\;,$$

For a $32\times32$, that's about 0.288.

But, when I generate a random matrix in Matlab, and check its rank, it's always 32! The code is: A=randi([0 1],32,32);rank(A). You can even try it online here.

Is the answer wrong? Is Matlab/Octave wrong? Please help me solve the mystery. Thanks!

Paul
  • 251

1 Answers1

1

That is a special result, for algebra modulo 2, binary. That is what $\mathbb{F}^2$ means.

For any of the following sets of random matrices:

$$ A \in \mathbb{R}^n \times \mathbb{R}^n,\{a_{ij} \sim N(0,1)\}\\ A \in \mathbb{R}^n \times \mathbb{R}^n,\{a_{ij} \sim U[0,1]\}\\ $$

Through any of the following standard commands, respectively:

rank(randn(32,32))
rank(rand(32,32))

The matrix has full rank almost surely, being the probability of having a full rank matrix equal to 1, as the standard interpretation of probability under infinite sets, there are possible values, but under a measure not comparable with the whole set measure.

By other side, the following set of random matrices: $$ A \in \mathbb{R}^n \times \mathbb{R}^n,\{a_{ij} \sim U[0,1]\}\\ $$

Realizable throught the command:

rank(randi([0,1],32,32))

The probability of having a full rank matrix is at least $1-(3/4+\sigma(1))^n$.

https://arxiv.org/abs/math/0501313

Probability that a random binary matrix is invertible?

If I generate a random matrix what is the probability of it to be singular?

https://mathoverflow.net/questions/12657/proving-almost-all-matrices-over-c-are-diagonalizable

https://en.wikipedia.org/wiki/Almost_surely

Brethlosze
  • 3,097
  • "almost always" has a technical meaning in probability theory; I don't think that's what you mean here (although I'd be surprised/delighted to be wrong :D) – Eric Stucky Jun 08 '17 at 03:12
  • i am almost surely this definition could apply here...... well not so sure. – Brethlosze Jun 08 '17 at 03:21
  • 1
    (i) "Almost surely" applies to events, not probabilities: you could say "The matrix has full rank almost surely" or "The probability of the matrix having full rank is equal to 1", but not both. (ii) However, the first half of the answer is irrelevant, because the question is about integer matrices. (iii) The result by Tao and Vu you cite applies to matrices with entries from ${-1,1}$. Is it obvious that the same is true for ${0,1}$ matrices? –  Jun 09 '17 at 19:46
  • 1
    i) Corrected. ii) At that moment i was thinking the OP wanted that information, now it is irrelevant as noted iii) No, it should be proven – Brethlosze Jun 09 '17 at 19:56
  • I actually see two different expressions for this probabiliy, i will check it more carefully. – Brethlosze Jun 09 '17 at 19:58