Exercise C24, page 278

Doing the computations by hand, find the determinant of the matrix below

A <- matrix(c(-2,3,-2,-4,-2,1,2,4,2), nrow = 3, byrow = T)
A
##      [,1] [,2] [,3]
## [1,]   -2    3   -2
## [2,]   -4   -2    1
## [3,]    2    4    2

Using the row expansion technique

A[1,1] * ((A[2,2] * A[3,3]) - (A[3,2] * A[2,3])) - 
  A[1,2] * ((A[2,1] * A[3,3]) - (A[3,1] * A[2,3])) +
  A[1,3] * ((A[2,1] * A[3,2]) - (A[2,2] * A[3,1]))
## [1] 70

Using the det() function in R

det(A)
## [1] 70