# A better way to evaluate a certain determinant

Question Statement:-

Evaluate the determinant: $$\begin{vmatrix} 1^2 & 2^2 & 3^2 \\ 2^2 & 3^2 & 4^2 \\ 3^2 & 4^2 & 5^2 \\ \end{vmatrix}$$

My Solution:-

\begin{align} \begin{vmatrix} 1^2 & 2^2 & 3^2 \\ 2^2 & 3^2 & 4^2 \\ 3^2 & 4^2 & 5^2 \\ \end{vmatrix} &= (1^2\times2^2\times3^2)\begin{vmatrix} 1 & 1 & 1 \\ 2^2 & \left(\dfrac{3}{2}\right)^2 & \left(\dfrac{4}{3}\right)^2 \\ 3^2 & \left(\dfrac{4}{2}\right)^2 & \left(\dfrac{5}{3}\right)^2 \\ \end{vmatrix}&\left[\begin{array}{11}C_1\rightarrow\dfrac{C_1}{1} \\ C_2\rightarrow\dfrac{C_2}{2^2}\\ C_3\rightarrow\dfrac{C_3}{3^2}\end{array}\right]\\ &= (1^2\times2^2\times3^2)\begin{vmatrix} 1 & 0 & 0 \\ 2^2 & \left(\dfrac{3}{2}\right)^2-2^2 & \left(\dfrac{4}{3}\right)^2-2^2 \\ 3^2 & 2^2-3^2 & \left(\dfrac{5}{3}\right)^2-3^2 \\ \end{vmatrix} &\left[\begin{array}{11}C_2\rightarrow C_2-C_1 \\ C_3\rightarrow C_3-C_1\end{array}\right]\\ &= (1^2\times2^2\times3^2) \begin{vmatrix} 1 & 0 & 0 \\ 2^2 & 2^2-\left(\dfrac{3}{2}\right)^2 & 2^2-\left(\dfrac{4}{3}\right)^2 \\ 3^2 & 3^2-2^2 & 3^2-\left(\dfrac{5}{3}\right)^2 \\ \end{vmatrix}\\ &=(1^2\times2^2\times3^2) \begin{vmatrix} 1 & 0 & 0 \\ 2^2 & \dfrac{7}{4} & \dfrac{20}{9} \\ 3^2 & 5 & \dfrac{56}{9} \\ \end{vmatrix}\\ &=(1^2\times2^2) \begin{vmatrix} 1 & 0 & 0 \\ 2^2 & \dfrac{7}{4} & 20 \\ 3^2 & 5 & 56 \\ \end{vmatrix}\\ &=4\times(-2)\\ &=-8 \end{align}

As you can see, my solution is a not a very promising one. If I encounter such questions again, so would you please suggest a better method which doesn't include this ridiculous amount of calculations.

• My only approach to make it simpler would be to subtract $4 \times R_1$ from $R_3$ to get a zero in your third row, then applying cofactor expansion immediately. But if you directly evaluate it (without any manipulation), it is a fairly straightforward computation – Hugh Entwistle Oct 15 '16 at 9:03
• @HughEntwistle - I spent so much time to solve it without expanding along row or column that I just generalised the question to $$\begin{vmatrix} x^2 & y^2 & z^2 \\ (x+1)^2 & (y+1)^2 & (z+1)^2 \\ (x+2)^2 & (y+2)^2 & (z+2)^2 \\ \end{vmatrix} \text{where, z=y+1=x+1}$$ and got stuck pretty badly so if there are any methods to solve it, please suggest me the same. – user350331 Oct 15 '16 at 9:09
• Don't involve $y$ and $z$ -- simply use the fact that $z=y+1=x+1$ In other words have your matrix entirely in terms of $x$ – Hugh Entwistle Oct 15 '16 at 9:27
• This post is - to some extent - related to the generalization: math.stackexchange.com/questions/1953843/… – Martin Sleziak Oct 16 '16 at 1:41

Create two zeroes in the first row ($C_2 \to C_2-\color{red}{4}C_1$ and $C_3 \to C_3-\color{blue}{9}C_1$) and expand: $$\begin{vmatrix} 1 & \color{red}{4} & \color{blue}{9} \\ 4 & 9 & 16 \\ 9 & 16 & 25 \\ \end{vmatrix}= \begin{vmatrix} 1 & 0 & 0 \\ 4 & 9-16 & 16-36 \\ 9 & 16-36 & 25-81 \\ \end{vmatrix} = \begin{vmatrix} -7 & -20 \\ -20 & -56 \\ \end{vmatrix} = 7 \cdot 56 - 20^2 = -8$$

• Your solution made me really depressed over all the time I had spent over this question when there was such an easy method sob. – user350331 Oct 15 '16 at 9:13
• It was not my intention to cause depressions ;-). – StackTD Oct 15 '16 at 9:13
• What row Ops did you use to get from line 1 to 2? – Cyclohexanol. Oct 15 '16 at 17:02
• Substract 4 times the first column of the second one and 9 times of the third one. – StackTD Oct 15 '16 at 17:04

Using the rule of Sarrus, the computation is really not too long, and we get in general for all $n\ge 1$, $$\det \begin{pmatrix} n^2 & (n+1)^2 & (n+2)^2\cr (n+1)^2& (n+2)^2 & (n+3)^2\cr (n+2)^2& (n+3)^2 & (n+4)^2\end{pmatrix}=-8.$$

If we consider

$$f(x)=\det\begin{pmatrix}x^2 & (x+1)^2 & (x+2)^2 \\ (x+1)^2 & (x+2)^2 & (x+3)^2 \\ (x+2)^2 & (x+3)^2 & (x+4)^2 \end{pmatrix}$$ we have: $$\scriptstyle f'(x) = \det\begin{pmatrix}2x & (x+1)^2 & (x+2)^2 \\ 2x+2 & (x+2)^2 & (x+3)^2 \\ 2x+4 & (x+3)^2 & (x+4)^2 \end{pmatrix}+\det\begin{pmatrix}x^2 & 2x+2 & (x+2)^2 \\ (x+1)^2 & 2x+4 & (x+3)^2 \\ (x+2)^2 & 2x+6 & (x+4)^2 \end{pmatrix}+\det\begin{pmatrix}x^2 & (x+1)^2 & 2x+4 \\ (x+1)^2 & (x+2)^2 & 2x+6 \\ (x+2)^2 & (x+3)^2 & 2x+8 \end{pmatrix}$$ and $f'(x)=0$ by Gaussian elimination. It follows that $f(x)$ is a constant function and $$f(1)=f(-2)=\det\begin{pmatrix}4 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 1 & 4\end{pmatrix}=-4-4=\color{red}{-8}.$$

• What's the downvote for? – Jack D'Aurizio Oct 16 '16 at 12:27
• I'll compensate for it! :) – user193319 Apr 1 '17 at 0:24

The direct formula for $3$ by $3$ determinants isn't so bad

$$\begin{vmatrix} a & b & c \\ d & e & f \\ g & h & i \\ \end{vmatrix}=aei+bfg+cdh-ceg-bdi-afh$$

so

$$\begin{vmatrix} 1 & 4 & 9 \\ 4 & 9 & 16 \\ 9 & 16 & 25 \\ \end{vmatrix}=225+576+576-729-400-256=-8.$$

Row operations and other similar tricks tend to speed things up only when the matrix is $4$ by $4$ or larger.

Subtract the first column from other columns to reduce $n^2$-s, then subtract twice the second column from the third one to reduce $n$: $$\begin{vmatrix} n^2 & (n+1)^2 & (n+2)^2 \\ (n+1)^2 & (n+2)^2 & (n+3)^2 \\ (n+2)^2 & (n+3)^2 & (n+4)^2 \end{vmatrix} = \begin{vmatrix} n^2 & 2n+1 & 4n+4 \\ (n+1)^2 & 2n+3 & 4n+8 \\ (n+2)^2 & 2n+5 & 4n+12 \end{vmatrix} = \begin{vmatrix} n^2 & 2n+1 & 2 \\ (n+1)^2 & 2n+3 & 2 \\ (n+2)^2 & 2n+5 & 2 \end{vmatrix}$$ Next subtract the first row from other rows, then twice the second row from the third one: $$\cdots = \begin{vmatrix} n^2 & 2n+1 & 2 \\ 2n+1 & 2 & 0 \\ 4n+4 & 4 & 0 \end{vmatrix} = \begin{vmatrix} n^2 & 2n+1 & 2 \\ 2n+1 & 2 & 0 \\ 2 & 0 & 0 \end{vmatrix}$$ Now we have a triangular determinant with three twos on its antidiagonal, so the determinant is $$2\cdot (-2)\cdot 2 = -8$$

\begin{align} \begin{vmatrix} x^2 & y^2 & z^2 \\ (x+1)^2 & (y+1)^2 & (z+1)^2 \\ (x+2)^2 & (y+2)^2 & (z+2)^2 \\ \end{vmatrix} &= \begin{vmatrix} x^2 & y^2 & z^2 \\ 2x+1 & 2y+1 & 2z+1 \\ 4x+4 & 4y+4 & 4z+4 \\ \end{vmatrix} \\ &= \begin{vmatrix} x^2 & y^2 & z^2 \\ 2x+1 & 2y+1 & 2z+1 \\ 2 & 2 & 2 \\ \end{vmatrix} \\ &= \begin{vmatrix} x^2-z^2 & y^2-z^2 & z^2 \\ 2x-2z & 2y-2z & 2z+1 \\ 0 & 0 & 2 \\ \end{vmatrix} \\ &= 4(x^2-z^2)(y-z) - 4(y^2-z^2)(y-z) \\ &= 4(x-z)(y-z)[(x+z) - (y+z)] \\ &= 4(x-z)(y-z)(x-y)] \\ &= -4(x-y)(y-z)(z-x)] \end{align}

When $x=n, \quad y=n+1, \quad z = n+2$, then

$\begin{vmatrix} n^2 & (n+1)^2 & (n+2)^2 \\ (n+1)^2 & (n+2)^2 & (n+3)^2 \\ (n+2)^2 & (n+3)^2 & (n+4)^2 \\ \end{vmatrix} =-4(-1)(-1)(2) = -8$