M16 Page 279
Given the matrix B = \[ \begin{bmatrix} 4-x & -4 & -4 \\ 2 & -2-x & -4 \\ 3 & -3 & -4-x \\ \end{bmatrix} \] find all values of x that are solutions of det(B) = 0.
For a 3x3 matrix where A =
\[ \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \\ \end{bmatrix} \] \[det(A)=a(ei−fh)−b(di−fg)+c(dh−eg)\]
\[(4-x)((-2-x)(-4-x)-(-4)(-3))-(-4)(2(-4-x)-(-4)(3))+(-4)(2(-3)-(-2-x)(3))\] \[(4-x)(8+4x+2x+x^2-12)-(-4)(-8-2x+12)+(-4)(-6-(-6-3x))\] \[(4-x)(x^2+6x-4)-(-4)(-2x+4)+(-4)(3x)\] \[(4x^2+24x-16-x^3-6x^2+4x)-(8x-16)-12x\] \[-x^3-2x^2+28x-8x-12x-16+16\] \[-x^3-2x^2+8x\] 2. Set determinant equal to 0 and solve
\[-x^3-2x^2+8x=0\] \[-x(x^2+2x-8)=0\] \[-x(x+4)(x-2)=0\]
\[x=0,\ x=-4,\ x=2\] 3. Substitute values and confirm determinant is 0
##when x=0
B_1 <- matrix(c(4,-4,-4,2,-2,-4,3,-3,-4), c(3,3), byrow = TRUE)
det(B_1)
## [1] 0
##when x=-4
B_2 <- matrix(c(8,-4,-4,2,2,-4,3,-3,0), c(3,3), byrow = TRUE)
det(B_2)
## [1] 0
##when x=2
B_3 <- matrix(c(2,-4,-4,2,-4,-4,3,-3,-6), c(3,3), byrow = TRUE)
det(B_3)
## [1] 0