** DATA_605_Discussion_2_C26_pg353_Daniel_Thonn **

http://rpubs.com/danthonn/357632

Find determinant by hand:

m1-hand= 2 * [1(1-4) -2(0-6) +4(0-3)] = -6 + 3 * [5(0-6)] -1 * (3-10) +4(9-0)] = 39 + -2 * [5(0-3) - 1(6-5) +2(9-0)] = -4 = -6 + 39 -4 = 29

Find determinant with R:

m1 <- matrix(
  c(2,5,3,5, 0,1,0,3, 3,2,1,2, 2,4,2,1),
  nrow = 4,
  ncol = 4)

m1
##      [,1] [,2] [,3] [,4]
## [1,]    2    0    3    2
## [2,]    5    1    2    4
## [3,]    3    0    1    2
## [4,]    5    3    2    1
det(m1)
## [1] 29
# det(m1) = 29

END