Chapter D, Section DM, Question M16 (pg.271)

Given the matrix
\[B = \left[\begin{array}{cc} 4-x & -4 & -4\\ 2 & -2-x & -4\\ 3 & -3 & -4-x \end{array}\right]\] Find all values of x that are solutions of det(B) = 0.

Solution

\[(4-x)\begin{vmatrix}-2-x & -4\\ -3 & -4-x \end{vmatrix} - (-4)\begin{vmatrix}2 & -4\\ 3 & -4-x \end{vmatrix} + (-4)\begin{vmatrix}2 & -2-x\\ 3 & -3 \end{vmatrix} = 0\]

\[(4-x)((-2-x)(-4-x)-(-4*-3))+4(2(-4-x)-(-4*3))-4((2*-3)-(3(-2-x))) = 0\]

\[(4-x)(x^2+6x-4)+4(-2x+4)-4(3x) = 0\]

\[4x^2+24x-16-x^3-6x^2+4x-8x+16-12x = 0\]

\[-x^3-2x^2+8x = 0\]

\[-x(x^2+2x-8) = 0\]

\[-x(x+4)(x-2) = 0\]

\[x = 0, x = -4, x = 2\]

Now letโ€™s verify:

a <- matrix(data = c(4,-4,-4,2,-2,-4,3,-3,-4),
            nrow=3, 
            ncol=3, 
            byrow=TRUE)

b <- matrix(data = c(8,-4,-4,2,2,-4,3,-3,0),
            nrow=3, 
            ncol=3, 
            byrow=TRUE)

c <- matrix(data = c(2,-4,-4,2,-4,-4,3,-3,-2),
            nrow=3, 
            ncol=3, 
            byrow=TRUE)


paste("The determinant where x = 0 is: ", det(a))
## [1] "The determinant where x = 0 is:  0"
paste("The determinant where x = -4 is: ", det(b))
## [1] "The determinant where x = -4 is:  0"
paste("The determinant wherex = 2 is:", det(c))
## [1] "The determinant wherex = 2 is: 0"