# Can the terms in a 3x3 determinant be any six nonzero numbers?

Given six nonzero real numbers $x_1,\ldots x_6$, can you construct a 3x3 matrix such that the six diagonal products that appear in the determinant are $x_1,\ldots,x_6$, respectively?

In other words, can you construct a matrix $\begin{bmatrix}a & b & c \\ d & e & f \\ g & h & i\end{bmatrix}$ so that

$$\begin{eqnarray*} aei &=& x_1\\ bfg &=& x_2\\ cdh &=& x_3\\ afh &=& -x_4\\ bdi &=& -x_5\\ ceg &=& -x_6\\ \end{eqnarray*}$$

If not, is there a neat way to describe constraints on $x_1,\ldots,x_6$ so that this is possible? Or, how many of the six terms can you choose arbitrariily?

The set of six equations has a solution if and only if following condition is satisfied: $$x_1 x_2 x_3 + x_4 x_5 x_6 = 0\tag{*1}$$ The "only if" part is obvious because the six equations together imply
$$x_1 x_2 x_3 = abcdefghi = - x_4 x_5 x_6$$
For the "if" part, when $(*1)$ is satisfied, there are infinitely many solutions. Following is one of them.
$$\begin{bmatrix} a & b & c\\ d & e & f\\ g & h & i\end{bmatrix} = \begin{bmatrix} x_1 & x_2 & x_3 \\ -\frac{1}{x_4} & \frac{x_2}{x_4 x_5} & \frac{1}{x_1}\\ x_1 & -x_4 & \frac{x_4 x_5}{x_2}\end{bmatrix}$$
For example, $$ceg = \frac{x_1 x_2 x_3}{x_4 x_5} = -\frac{x_4 x_5 x_6}{x_4 x_5} = -x_6$$