How to calculate the determinant of a $4 \times 4$ matrix with multiple variables?

Solution 1:

Consider instead the polynomial in $x$

$P(x)=\det\begin{pmatrix}1&x&x^2&x^3&x^4\\1&a&a^2&a^3&a^4\\1&b&b^2&b^3&b^4\\1&c&c^2&c^3&c^4\\1&d&d^2&d^3&d^4\end{pmatrix}$.

If you use Laplace's expansion in the first row, you'll notice that $P(x)$ has degree $4$.

Also, $P(a)=P(b)=P(c)=P(d)=0$ because plugging $x=a,b,c,d$ creates two equal rows and the determinant vanishes.

Now, by Vieta's relations, and recalling that the terms in the Laplace's expansion alternate signs, the term in $x^3$ is the sum of the roots, so

$a+b+c+d=\frac{\det\begin{pmatrix}1& a& a^2& a^4\\1& b& b^2& b^4\\1& c& c^2& c^4\\1& d& d^2& d^4\end{pmatrix}}{\det\begin{pmatrix}1& a& a^2& a^3\\1& b& b^2& b^3\\1& c& c^2& c^3\\1& d& d^2& d^3\end{pmatrix}}$

Now we can use Vandermonde's determinant and finish the problem:

$\det\begin{pmatrix}1& a& a^2& a^4\\1& b& b^2& b^4\\1& c& c^2& c^4\\1& d& d^2& d^4\end{pmatrix}=(a+b+c+d)(d-a)(d-c)(d-b)(c-a)(c-b)(b-a)$.

Solution 2:

As you already noted the determinant is a polynomial of 4th degree in $d$.

This polynomial is zero if you replace $d$ by $a$, $b$, or $c$ (we have two identical rows).

Moreover the coefficient of $d^3$ is zero which implies that the sum of the roots is zero. Hence the fourth root is $-(a+b+c)$.

Finally, by Vandermonde's determinant, the coefficient of $d^4$ is $$\det\begin{pmatrix}1& a& a^2\\1& b& b^2\\1& c& c^2 \end{pmatrix}=(a-b)(b-c)(c-a).$$ Therefore the required determinant is $$(a-b)(b-c)(c-a)\cdot (d-a)(d-b)(d-c)(d+a+b+c).$$

Solution 3:

$$\text{Det}(A)=\begin{vmatrix}1& a & a^2 & a^4 \\ 1 & b & b^2 & b^4 \\ 1 & c & c^2 & c^4 \\1 & d & d^2 &d^4 \end{vmatrix}=\begin{vmatrix}1& a & a^2 & a^4 \\ 0 & b-a & b^2-a^2 & b^4-a^4 \\ 0 & c-a & c^2-a^2 & c^4-a^4 \\0 & d-a & d^2-a^2 &d^4-a^4 \end{vmatrix}=\begin{vmatrix} b-a & b^2-a^2 & b^4-a^4 \\ c-a & c^2-a^2 & c^4-a^4 \\ d-a & d^2-a^2 &d^4-a^4 \end{vmatrix}$$ thus $$\text{Det}(A)=(b-a)(c-a)(d-a)\begin{vmatrix} 1 & b+a &(b+a)(b^2+a^2) \\ 1 & c+a & (c+a)(c^2+a^2) \\ 1 & d+a &(d+a)(d^2+a^2) \end{vmatrix}$$ As a result $$\text{Det}(A)=(b-a)(c-a)(d-a)\begin{vmatrix} 1 & b &(b+a)(b^2+a^2) \\ 0 & c-b & (c+a)(c^2+a^2)-(b+a)(b^2+a^2) \\ 0 & d-b &(d+a)(d^2+a^2)-(b+a)(b^2+a^2) \end{vmatrix}$$ therefore $$\text{Det}(A)=(b-a)(c-a)(d-a)\begin{vmatrix} c-b & (c+a)(c^2+a^2)-(b+a)(b^2+a^2) \\ d-b &(d+a)(d^2+a^2)-(b+a)(b^2+a^2) \end{vmatrix}$$ In other words $$\text{Det}(A)=(b-a)(c-a)(d-a)\begin{vmatrix} c-b & (c^3-b^3)+a(c^2-b^2)+a^2(c-b) \\ d-b &(d^3-b^3)+a(d^2-b^2)+a^2(d-b) \end{vmatrix}$$ or $$\text{Det}(A)=(b-a)(c-a)(d-a)(c-b)(d-b)\begin{vmatrix} 1 & (c^2+bc+b^2)+a(c+b)+a^2 \\ 1 &(d^2+bd+b^2)+a(d+b)+a^2 \end{vmatrix}$$ Finally we have $$\text{Det}(A)=(b-a)(c-a)(d-a)(c-b)(d-b)\begin{vmatrix} 1 & (c^2+bc+b^2)+a(c+b)+a^2 \\ 0 &(d^2-c^2)+b(d-c)+a(d-c) \end{vmatrix}\\ \quad=(b-a)(c-a)(d-a)(c-b)(d-b)[(d^2-c^2)+b(d-c)+a(d-c)]\\ $$ or $$\text{Det}(A)=(b-a)(c-a)(d-a)(c-b)(d-b)(d-c)(a+b+c+d)$$