TITLE: Show that there is always a way to achieve det(A) > 0
QUESTION [11 upvotes]: a) Assume that $(a_1, ..., a_9)$ are different positive numbers. Let us make a $3 \times 3$ matrix $A_s$ by placing them arbitrarily into $9$ positions available. Show that there is always a way to assemble them so that $\det(A_s) > 0$.
b) Assume now that some of $a_i, i =1,\dots,9$ are equal and the total number of different values taken by the $a_i$ is $N \in \{1,2,...,9\}$.  What is the minimal $N$ which guarantees the existence of $A_s$ as above with $\det(A_s) >0$? Give a proof.
For part (a), I tried to show that, with row operations, $\det(A_s)$ can never equal $0$, so that the matrix is invertible, with determinant either negative or positive. Then if the determinant is positive, the proof is complete; if not, then simply interchange any two rows, which negates the determinant, giving a positive determinant as required. However, this proof doesn't work. Using just the numbers $1 \dots 9$, then $(7,8,9)$ is in the span of $(1,2,3)$ and $(4,5,6)$.
Since the question is asking to show that there is always a way, i.e., there exists  a way to achieve $\det(A_s)>0$, I feel that I should work on a contradiction, and assume first that there is no way to achieve it.
Perhaps I can use the fact that $\rm{trace} \, A_s$ must be positive, but I don't see it right now.
Any hints would be greatly appreciated.
Thanks.

REPLY [4 votes]: Lemma. If positive numbers $a_1,a_2,a_3,a_4$ have at least two different values, then they can be put into a $2\times 2$ matrix so that the determinant is nonzero.
Proof: Suppose that $0 < a_1\leq a_2\leq a_3\leq a_4$, where not all the $a_i$'s are the same.  Then $a_1a_2 < a_3 a_4$, so the matrix $\begin{bmatrix}a_3 & a_1 \\ a_2 & a_4\end{bmatrix}$ must have positive determinant.$\quad\square$
Theorem. If a sequence $a_1,\ldots,a_9$ of positive numbers has at least three different values, then they can be put into a $3\times 3$ matrix so that the determinant is nonzero.
Proof: Suppose $a_1,\ldots,a_9$ has at least three different values.  If one of these values occurs seven times, then the matrix
$$
\begin{bmatrix}a & c & c \\ c & b & c \\ c & c & c\end{bmatrix}
$$
has determinant $c(a-c)(b-c)$, which is nonzero.  Suppose then that no value occurs more than six times.  Without loss of generality, we may assume that $a_1,a_2,a_3$ are all distinct and that $a_4,a_5,a_6,a_7$ are not all the same.  By the lemma, it follows that
$$
\left|\begin{matrix}a_4 & a_5 \\ a_6 & a_7\end{matrix}\right|\ne 0
$$
after a sufficient permutation of $a_4,a_5,a_6,a_7$.  Now consider the following three matrices, which differ only in the first row.
$$
A = \begin{bmatrix}a_1 & a_2 & a_3 \\ a_8 & a_4 & a_5 \\ a_9 & a_6 & a_7 \end{bmatrix},\qquad
B = \begin{bmatrix}a_2 & a_3 & a_1 \\ a_8 & a_4 & a_5 \\ a_9 & a_6 & a_7 \end{bmatrix},\qquad
C = \begin{bmatrix}a_3 & a_1 & a_2 \\ a_8 & a_4 & a_5 \\ a_9 & a_6 & a_7 \end{bmatrix}.
$$
Since $a_1,a_2,a_3$ are distinct positive numbers, the vectors $(a_1,a_2,a_3)$, $(a_2,a_3,a_1)$, and $(a_3,a_1,a_2)$ are linearly independent.  Then:
$$
\lambda (a_1,a_2,a_3)+\mu(a_2,a_3,a_1)+\nu (a_3,a_1,a_3) = (a_1+a_2+a_3,0,0).
$$
for some $\lambda,\mu,\nu\in\mathbb{R}$. Taking the dot product of this equation with the vector $(1,1,1)$ gives
$$
(\lambda+\mu+\nu)(a_1+a_2+a_3) = a_1+a_2+a_3,
$$
so $\lambda+\mu+\nu = 1$. It follows that
$$
\lambda A +\mu B + \nu C \;=\; \begin{bmatrix}a_1+a_2+a_3 & 0 & 0 \\ a_8 & a_4 & a_5 \\ a_9 & a_6 & a_7 \end{bmatrix},
$$
so $|\lambda A+\mu B+\nu C| = (a_1+a_2+a_3)\left|\begin{matrix}a_4 & a_5 \\ a_6 & a_7\end{matrix}\right| \ne 0$.  But, by the multilinearity of the determinant,
$$
|\lambda A+\mu B + \nu C| \;=\; \lambda |A| + \mu |B| +\nu |C|,
$$
so at least one of $|A|$, $|B|$, and $|C|$ must be nonzero.$\quad\square$
Note that $N=2$ does not suffice.  In particular, if eight of the numbers are the same, then any matrix that you make will have at least two identical rows, so the determinant will be zero.