the minimum and maximum values of the determinant of order $3\times3$ matrix with entries $\{0,1,2,3\}$ The minimum and maximum values of the determinant of order $3\times3$ matrix with entries $\{0,1,2,3\}$.
 A: Brute force enumeration gives a maximum of $54$ (and hence a minimum of $-54$ since $\det (-A) = - \det A$ for $n$ odd).
A maximising matrix would be $\begin{bmatrix} 0 & 3 & 3 \\
3 & 0 & 3 \\
3 & 3 & 0
\end{bmatrix}$.
In Python:
import numpy
import itertools

N = 3
cols = list(itertools.product(range(0, N+1), repeat=N))
mats = itertools.product(cols, cols, cols)
sup = 0
sup_p = None
for p in mats:
    d = numpy.linalg.det(p)
    if d > sup:
        sup = d
        sup_p = p

print sup
print sup_p

Note: 
A slight improvement would notice that the problem can be written
as $\max \{ \det A \,|\,  [A]_{ij} \in \{0,1,2,3\} \}$ and since the cost is
affine in each matrix element, the maximiser must have extreme values
for all entries. Hence the problem is equivalent to 
$\max \{ \det A \,|\, [A]_{ij} \in \{0,3\} \}$.
Since the problem is also equivalent to 
$\max \{ |\det A| \,|\, [A]_{ij} \in \{0,3\} \}$, the order of rows (or columns)
doesn't matter and so we can choose the first row from
$\{(0,0,0), (3,0,0), (3,3,0), (3,3,3) \}$. This reduces the search space.
Since $(0,0,0)$  (or repeating a row) will result in a zero determinant,
the search space can be reduced further to at most
$3 \cdot \binom{7}{2} = 63$ possibilities, which is a little better
than the original $4^9 = 262,144$.
And finally, although irrelevant to the problem, we note that
this solves the problem $\max \{ |\det A| \,|\, [A]_{ij} \in [0,3] \}$,
the maximum volume of a box whose sides have $l_1$ length no greater than $3$.
A: From Hadamard's determinant bound one can deduce that the absolute value of the determinant is at most $54$.  This is done as follows.  Let $M$ be an $n\times n$ matrix whose elements lie in the interval $[0,a]$, for some positive number $a$.  Then
$$
\det M=\left(\frac{a}{2}\right)^n\det\left[\begin{array}{c|ccc}1 & 1 & 1 & 1\\ \hline 0 & & &\\ 0 & & \frac{2}{a}M & \\ 0 & & &\end{array}\right]=\left(\frac{a}{2}\right)^n\det\left[\begin{array}{c|ccc}1 & 1 & 1 & 1\\ \hline -1 & & &\\ -1 & & \frac{2}{a}M-J & \\ -1 & & &\end{array}\right],
$$
where $J$ is the all-ones matrix.  The matrix in the final expression is an $(n+1)\times(n+1)$ matrix whose elements lie in the interval $[-1,1]$.  Its rows are therefore vectors of length at most $\sqrt{n+1}$, and its determinant is at most $(n+1)^{(n+1)/2}$.  Hence
$$
\lvert\det M\rvert\le\left(\frac{a}{2}\right)^n(n+1)^{(n+1)/2}.
$$
Applying this to the case $n=3$, $a=3$, we find that $\lvert\det M\rvert\le54$.
To see whether the bound can actually be attained, note first that the maximum and minimum values of $\det M$ differ only in sign since swapping two rows or two columns of $M$ negates its determinant.  As pointed out by copper.hat, there is no need ever to use elements other than $0$ and $3$.  Hence in the matrix in the final expression above, there is no need to use elements other than $-1$ and $1$.  Equality in Hadamard's bound is attained only by matrices with pairwise orthogonal rows, that is, by Hadamard matrices.  
That a $4\times4$ Hadamard matrix exists is known due to a construction of Sylvester:
$$
\begin{bmatrix}1 & 1\\ 1 & -1\end{bmatrix}\otimes\begin{bmatrix}1 & 1\\ 1 & -1\end{bmatrix}=\begin{bmatrix}1 & 1 & 1 & 1\\ 1 & -1 & 1 & -1\\ 1 & 1 & -1 & -1\\ 1 & -1 & -1 & 1\end{bmatrix}
$$
is such a matrix.  Negating row $2$, $3$, and $4$, adding $J$ to the $3\times3$ submatrix in the lower right corner, and multiplying by $\frac{3}{2}$ gives the matrix
$$
M=\begin{bmatrix}3 & 0 & 3\\ 0 & 3 & 3\\ 3 & 3 & 0\end{bmatrix},
$$
which has determiant $-54$.  Swapping two rows gives a matrix with determinant $54$.
A: I don't know anything about Hadamard's inequality...
But I have a better technique.
Here the smallest element is $0$ and the largest element is $3$
So, the determinant will be max when $0$ is the diagonal element and $3$ is the non-diagonal element, meaning that the answer is $54$.
