# Number of $(0,1)$ $m\times n$ matrices with no empty rows or columns

I am looking to calculate the number of $m\times n$ matrices which have no empty rows or columns (at least one $1$ in each row and column).

I have looked at the answers to a few similar questions such as 35019 and 329932 but I am struggling to make these approaches work in this case.

#### Solutions Collecting From Web of "Number of $(0,1)$ $m\times n$ matrices with no empty rows or columns"

Let $C$ be a fixed set of $k$ columns; we’ll count the binary matrices that have a $1$ in every row but have no $1$ in any of the columns in $C$. In each row there are $2^{n-k}-1$ ways to choose a non-empty subset of the remaining $n-k$ columns in which to place ones, and there are $m$ rows, so there are $\left(2^{n-k}-1\right)^m$ such matrices. There are $\binom{n}k$ ways to choose $C$, so a standard inclusion-exclusion calculation then shows that there are

$$\sum_{k=0}^n\binom{n}k(-1)^k\left(2^{n-k}-1\right)^m\tag{1}$$

$m\times n$ binary matrices with no zero rows or columns.

As noted in the comments, the case $m=n$ of $(1)$ is OEIS A048291; the fact that no closed form is given even for the square case suggests that no closed form is known, or at least that no nice closed form is known.