How many 1's can a regular 0,1-matrix contain? A matrix of order $n$ has all of its entries in $\{0,1\}$. What is the maximum number of $1$ in the matrix for which the matrix is non singular.

It should be $n^2-n+1$. Let $v=e_1+\cdots+e_n$, where $\{e_1, \cdots, e_n\}$ is the standard orthonormal basis. Then the matrix with row vectors $\{v, v-e_1, \cdots, v-e_{n-1}\}$ is a matrix containing the maximum number of 1 for which it is nonsingular.
