Answer
$x =\pm 1$
Work Step by Step
The determinant for a 2 by 2 matrix can be computed as:
$Determinant (D)= \begin{vmatrix} A & B \\
C & D\end{vmatrix}=AD-BC$
Therefore, $Det=\begin{vmatrix} x & 1 \\
3 & x \end{vmatrix}=x^2-3$
Since $det=-2$
So, $x^2-3=-2 \implies x^2=1 $
or, $x =\pm 1$