# Finding $\max |A|$ with $a_{ij}=\pm 1$

$A$ is a matrix sized $n\times n$, all elements in $A$ are $\pm1$. Find $\max |A|$.

My Attempt
Denote $f(n)=\max |A_{n\times n}|$.
$f(1)=1$.
$f(2)=2$ is also obviously.
If $n\ge2$, $|A|$ must be even.
For $n=3$, $f(3)\ge4$ because $\left|\begin{array} r1&1&1\\1&-1&1\\1&-1&-1 \end{array}\right|=4$. Also, $|A|=A_{11} A_{22} A_{33}+A_{12} A_{23} A_{31}+A_{13} A_{21} A_{32}-A_{13} A_{22} A_{31}-A_{11} A_{23} A_{32}-A_{12} A_{21} A_{33}$ can not be $6$ since $A_{11} A_{22} A_{33}A_{12} A_{23} A_{31}A_{13} A_{21} A_{32}A_{13} A_{22} A_{31}A_{11} A_{23} A_{32}A_{12} A_{21} A_{33}$ must be $1$. $1\ne 1\cdot1\cdot1\cdot(-1)\cdot(-1)\cdot(-1)$.
Hence we have $f(3)\ne 6$. $f(3)=4$.
For $n\ge4$, I have no idea where to start with $f(n)$.
A trivial bound is $0<f(n)\le n!$.
EDIT
Related question:Maximum value of Determinant of $3 \times 3$ Matrix with entries $\pm 1$
It is not duplicated since I am discussing $n\times n$ determinants, not $3\times3$.

• $f(n) \leq n^{2}$ because any eigen value $\lambda$ is bounded by $n$ and $|A|$ is the product of the eigen values. Sep 10, 2018 at 8:36
• Related: oeis A003433 Sep 10, 2018 at 9:01
• This problem is called "Hadamard maximal determinant problem". Sep 10, 2018 at 9:17
• Your question seems to be an open problem... Anyway, consider adding the first column to each of the others. This does not change the determinant, but since $-1\equiv 1 \pmod 2$, each column $c_i$ can now be written as $2c_i'$ where $c_i'$ has integer entries. Thus $|A|=2^{n-1}|A'|$, where $|A'|$ is an integer. Sep 10, 2018 at 9:32
• There's also a Hadamard bound for the determinant of a matrix. Look it up. Sep 10, 2018 at 10:21