<s>[INST] Solving variables in a matrix for a specific determinant The matrix is as follows:
$$
A =
\begin{pmatrix}
0 & x & 1 & 2 \\
x & 1 & 1 & x \\
1 & x & x & 1 \\
1 & x & 1 & x
\end{pmatrix}
$$
What I want to do is to find all the solutions for the equation: $$\det(A) = 0$$
At first I attempted to simplify it into a polynomial, but ending up with a 4th degree term makes me wonder if there's any easier way of solving this? You can easily see that the rows/columns would be linearly independent if $x$ is equal to $1$. But I'm having a hard time realizing any other solutions this way.
Have you guys got any idea? Any help would be much appreciated!
 [/INST] $$A =
\begin{vmatrix}
0 & x & 1 & 2 \\
x & 1 & 1 & x \\
1 & x & x & 1 \\
1 & x & 1 & x
\end{vmatrix}\stackrel{R_2-xR_3\,,R_4-R_3}=\begin{vmatrix}
0 & x & 1 & 2 \\
0 & 1-x^2 & 1-x^2 & 0 \\
1 & x & x & 1 \\
0 & 0 & 1-x & x-1
\end{vmatrix}=
$$
$$\begin{vmatrix}
 x & 1 & 2 \\
 1-x^2 & 1-x^2 & 0 \\
 0 & 1-x & x-1
\end{vmatrix}=(1-x^2)(1-x)\begin{vmatrix}
 x & 1 & 2 \\
 1 & 1 & 0 \\
 0 & 1 & \!\!-1
\end{vmatrix}=(1-x)^2(1+x)\left[-x+2+1\right]=$$
$$=-(x-1)^2(x+1)(x-3)$$
</s>