Solve equation in determinant

$$ \begin{vmatrix} x & a & b &c \\ a & x & b &c \\ m &n & x &p \\ m& n& p& x \end{vmatrix}=0 $$ Subtract the first row to the second row, subtract the third row from the fourth row: $$ \begin{vmatrix} x & a & b &c \\ a-x & x-a & 0 &0 \\ m &n & x &p \\ 0& 0& p-x& x-p \end{vmatrix}=0 $$ Factorize $(a-x)$ and $(x-p)$ out: $$ (a-x)(x-p)\begin{vmatrix} x & a & b &c \\ 1 & -1 & 0 &0 \\ m &n & x &p \\ 0& 0& -1& 1 \end{vmatrix}=0 $$ Add the first column to the second column: $$ (a-x)(x-p)\begin{vmatrix} x & a+x & b &c \\ 1 & 0 & 0 &0 \\ m &n+m & x &p \\ 0& 0& -1& 1 \end{vmatrix}=0 $$ Compute the determinant by using the second row: $$ (a-x)(x-p)\begin{vmatrix} a+x & b &c \\ n+m & x &p \\ 0& -1& 1 \end{vmatrix}=0 $$ Add the third column to the second column: $$ (a-x)(x-p)\begin{vmatrix} a+x & b+c &c \\ n+m & p+x &p \\ 0& 0& 1 \end{vmatrix}=0 $$

Expand the determinant by the last row:

$$ (a-x)(x-p)\begin{vmatrix} a+x & b+c \\ n+m & p+x \\ \end{vmatrix}=0 $$ Adding the first row to second row: $$ (a-x)(x-p)\begin{vmatrix} a+x & b+c \\ x+a+n+m & b+c+p+x \\ \end{vmatrix}=0 $$ Factorize $(x+a+n+m)$ out since $a+m+n=b+c+p$:

$$ (a-x)(x-p)(x+a+n+m)\begin{vmatrix} a+x & b+c \\ 1 & 1 \\ \end{vmatrix}=0 $$

$$(a-x)(x-p)(x+a+n+m)(x+a-b-c)=0$$


The equation $$\begin{vmatrix} x & a & b &c \\ a & x & b &c \\ m &n & x &p \\ m& n& p& x \end{vmatrix} =0$$ is equivalent to $p_A(-x)=0$, where $p_A$ is the characteristic polynomial of $$A=\begin{pmatrix} 0 & a & b & c \\ a & 0 & b & c \\ m &n & 0 &p \\ m& n& p& 0 \end{pmatrix};$$hence the roots of your equation must be the opposite of the eigenvalues of $A$. The condition that $a+m+n=b+c+p$ is equivalent to $a-b-c=-m-n+p$, which tells you that $(1,1,-1,-1)$ is an eigenvector, with associated eigenvalue $a-b-c$. Moreover $-a$ and $-p$ are obviously eigenvalues, and the trace of the matrix is $0$; hence the sum of the eigenvalues is zero, which means that the last eigenvalue must be $b+c-a+a+p=b+c+p$.

So the solutions to your equation are $a$, $p$, $-(b+c+p)$ and $b+c-a$.


Subtract the first line from the second: $$\begin{vmatrix} x & a & b &c \\ a & x & b &c \\ m &n & x &p \\ m& n& p& x \end{vmatrix}=\begin{vmatrix} x-a & a-x & 0 &0 \\ a & x & b &c \\ m &n & x &p \\ m & n& p& x \end{vmatrix}=(x-a)\begin{vmatrix} 1 &-1 & 0 &0 \\ a & x & b &c \\ m &n & x &p \\ m & n& p& x \end{vmatrix}=$$ $1.$ Multiply the first by $-a$ and add on the second

$2.$ Multiply the first by $-m$ and add on the third

$3.$ Multiply the first by $-m$ and add on the forth

$$(x-a)\begin{vmatrix} 1 &-1 & 0 &0 \\ 0 & x+a & b &c \\ 0 &m+n & x &p \\ 0 &m+ n& p& x \end{vmatrix}=$$

Forth line minus third:

$$(x-a)\begin{vmatrix} 1 &-1 & 0 &0 \\ 0 & x+a & b &c \\ 0 &m+n & x &p \\ 0 &0& p-x& x-p \end{vmatrix}=(x-a)(x-p)\begin{vmatrix} 1 &-1 & 0 &0 \\ 0 & x+a & b &c \\ 0 &m+n & x &p \\ 0 &0& -1& 1 \end{vmatrix}=$$

Laplace theorem on the first column $$(x-a)(x-p)\begin{vmatrix} x+a & b &c \\ m+n & x &p \\ 0& -1& 1 \end{vmatrix}=0$$

Add second and third column on the second

$$(x-a)(x-p)\begin{vmatrix} x+a & b+c &c \\ m+n & x+p &p \\ 0& 0& 1 \end{vmatrix}=0$$

Laplace on the third line

$$(x-a)(x-p)\begin{vmatrix} x+a & b+c \\ m+n & x+p \\ \end{vmatrix}=0$$

Now $a+m+n=p+b+c=k$ then

$$(x-a)(x-p)\begin{vmatrix} x+a & k-p \\ k-a & x+p \\ \end{vmatrix}=0$$

Add first line on the second

$$(x-a)(x-p)\begin{vmatrix} x+a & k-p \\ x+k & x+k \\ \end{vmatrix}=(x-a)(x-p)(x+k)\begin{vmatrix} x+a & k-p \\ 1 & 1 \\ \end{vmatrix}=0$$

$$(x-a)(x-p)(x+k)(x+a+p-k)=0$$

$$(x-a)(x-p)(x+k)(x+a+p-k)=0$$