maximum value of $\det(A)$, elements $0, 1, 2, 3$, 

$A$ is a $3\times 3$ real matrix, whose elements can be $0, 1, 2, 3$. 

What is the maximum value of $\det(A)$?


$\det(3I)=27$, the maximum value should be $\gt27$. 
Thank you very much for your help!
 A: If we fix eight entries of $A$ and let the remaining one be a continuous variable inside the domain $[0,3]$, then $\det(A)$ becomes an affine function. Thus its has a maximum at some corner point of $[0,3]$. It follows that the maximum determinant of $A$ when all entries of $A$ are taken from $\{0,1,2,3\}$ is identical to the maximum deteminant of $A$ when entries of $A$ are taken from $\{0,3\}$.
So, this boils down to Hadamard's determinant problem with $n=3$. When all entries of a $3\times3$ matrix $A$ are taken from $\{0,1\}$, its maximum determinant is known to be $2$ (this can also be verified easily by a brute-force search). Multiply it by $3^3$, we get the answer $54$, as realised by the matrix mentioned in Suugaku's comment.
A: Since we wish the largest possible determinant, and all the entries are non-negative, we must limit ourselves to having only the "added" terms intact and the "subtracted" terms all be zero.  Thus we need to have 
$$a_{13} \ a_{22} \ a_{31} \ = \ 0 \ , \ a_{12} \ a_{21} \ a_{33} \ = \ 0 \ , \ a_{11} \ a_{23} \ a_{32} \ = \ 0 \ \ . $$
We would also like to maximize the "added" terms, $ \ a_{11} \ a_{22} \ a_{33} \ , \ a_{12} \ a_{23} \ a_{31} \ , \  \ \text{and} \  \ a_{13} \ a_{21} \ a_{32} \ $ .
But we can't use "3" in every entry, as that would produce a singular matrix.  
We are left with making two of the "added" terms in the determinant equal to $ \ 3^3 \ = \ 27 \ $ , and arranging to "zero out" all the "subtracted" terms by "sacrificing" the major diagonal product, $ \ a_{11} \ a_{22} \ a_{33} \ $ .  Thus, setting the major diagonal entries to zero and the off-diagonal terms all to 3 produces the maximum possible determinant, that shown in Suugaku's comment.
EDIT -- On thinking about this a bit more the following morning, I realized that we are not limiting to "zeroing" the major diagonal, and that these variants also meet the conditions described above:
$$ \left[ \begin{array}{ccc} 3 & 0 & 3 \\ 3 & 3 & 0 \\ 0 & 3 & 3 \end{array} \right] \ \ , \ \ \left[ \begin{array}{ccc} 3 & 3 & 0 \\ 0 & 3 & 3 \\ 3 & 0 & 3 \end{array} \right] \ \ . $$
A: There is a an upper bound for the determinant of a $K \times K$ real valued matrix $A$, whose maximum element is bounded by $\beta$. In such a case, 
$|det(A)| \leq \left(\frac{\beta}{2}\right)^{K} (K+1)^{(K+1)/2}$. This is also from the Hadamard maximum determinant theorem. Please refer:   Brenner, J. and Cummings, L. "The Hadamard Maximum Determinant Problem." Amer. Math. Monthly 79, 626-630, 1972.
