“Find a value of \(k\) so that the matrix \(A=\begin{bmatrix} 1 & 2 & 1\\2 & 0 & 1\\2 & 3 & k\end{bmatrix}\) has det\((A)=0\), or explain why this is not possible.”
det\((A)=1\begin{vmatrix}0 & 1\\3 & k\end{vmatrix}-2\begin{vmatrix}2 & 1\\2 & k\end{vmatrix}+1\begin{vmatrix}2 & 0\\2 & 3\end{vmatrix}\\=1((0)(k)-(1)(3))-2((2)(k)-(2)(1))+1((2)(3)-(2)(0))\\=1(-3)-2(2k-2)+1(6)\\=-3-4k+4+6\\=-4k+7\)
Thus to get det\((A)=0\), we need to solve the equation \(0=-4k+7\), which results in the solution \(k=1.75\)
Testing that this solution is correct:
matrix_A <- matrix(c(1,2,2,2,0,3,1,1,1.75), nrow = 3)
matrix_A
## [,1] [,2] [,3]
## [1,] 1 2 1.00
## [2,] 2 0 1.00
## [3,] 2 3 1.75
test_determinant <- round(det(matrix_A),10)
test_determinant
## [1] 0
#The determinant is rounded since it returns an infinitesimally small value.