Doing the computations by hand, find the determinant of the matrix A (Question C30, Page 354).
For this problem, I will reduce the matrix to a triangular matrix and use the diagonal to find the determinant.
## [,1] [,2] [,3] [,4] [,5]
## [1,] 2 1 1 0 1
## [2,] 2 1 2 -1 1
## [3,] 0 0 1 2 0
## [4,] 1 0 3 1 1
## [5,] 2 1 1 2 1
## [,1] [,2] [,3] [,4] [,5]
## [1,] 2 1 1 0 1
## [2,] 2 1 2 -1 1
## [3,] 0 0 1 2 0
## [4,] 1 0 3 1 1
## [5,] 0 0 0 2 0
## [,1] [,2] [,3] [,4] [,5]
## [1,] 2 1 1 0 1
## [2,] 0 0 1 -1 0
## [3,] 0 0 1 2 0
## [4,] 1 0 3 1 1
## [5,] 0 0 0 2 0
## [,1] [,2] [,3] [,4] [,5]
## [1,] 2 1 1 0 1
## [2,] 0 0 1 -1 0
## [3,] 0 0 0 3 0
## [4,] 1 0 3 1 1
## [5,] 0 0 0 2 0
In this step, we see that rows 3 and 5 of this matrix are linearly dependent. This confirms that the determinant of the matrix is zero, but we will continue with row operations until the matrix is triangular.
## [,1] [,2] [,3] [,4] [,5]
## [1,] 0 1 -5 -2 -1
## [2,] 0 0 1 -1 0
## [3,] 0 0 0 3 0
## [4,] 1 0 3 1 1
## [5,] 0 0 0 2 0
## [,1] [,2] [,3] [,4] [,5]
## [1,] 0 1 -5 -2 -1
## [2,] 0 0 1 -1 0
## [3,] 0 0 0 0 0
## [4,] 1 0 3 1 1
## [5,] 0 0 0 2 0
Here, we flip the order of the rows to obtain a triangular matrix. Since diagonal contains a zero, this confirms that the determinant of this 5x5 matrix is zero.
B = matrix(nrow=5, ncol=5)
B[1,] <- A[4,]
B[2,] <- A[1,]
B[3,] <- A[2,]
B[4,] <- A[5,]
B[5,] <- A[3,]
print(B)## [,1] [,2] [,3] [,4] [,5]
## [1,] 1 0 3 1 1
## [2,] 0 1 -5 -2 -1
## [3,] 0 0 1 -1 0
## [4,] 0 0 0 2 0
## [5,] 0 0 0 0 0
The determinant of the matrix is 0 (confirmed using det).
## [1] 0