  A zero-one matrix $M$ is said to contain another zero-one matrix $A$ if we
can delete some rows and columns of $M$ and replace some $1$-entries with
$0$-entries such that the resulting matrix is $A$. The extremal number of $A$,
denoted $\operatorname{ex}(n,A)$, is the maximum number of $1$-entries that an
$n\times n$ zero-one matrix can have without containing $A$. The systematic
study of this function for various patterns $A$ goes back to the work of
F\"uredi and Hajnal from 1992, and the field has many connections to other
areas of mathematics and theoretical computer science. The problem has been
particularly extensively studied for so-called acyclic matrices, but very
little is known about the general case (that is, the case where $A$ is not
necessarily acyclic). We prove the first asymptotically tight general result by
showing that if $A$ has at most $t$ $1$-entries in every row, then
$\operatorname{ex}(n,A)\leq n^{2-1/t+o(1)}$. This verifies a conjecture of
Methuku and Tomon.
  Our result also provides the first tight general bound for the extremal
number of vertex-ordered graphs with interval chromatic number $2$,
generalizing a celebrated result of F\"uredi, and Alon, Krivelevich and Sudakov
about the (unordered) extremal number of bipartite graphs with maximum degree
$t$ in one of the vertex classes.
