Reading Question and the excercise - C31
The easiest way to determine a square matrix is non-singular if the determinent of matrix is non zero. when a square matrix A is called non-singular, only if there is an inverse exist(i.e A−1)
A_Inverse = 1/det(A) * Adj(A)
if det(A) is zero, A_inverse doesnt exist, there by matrix A is a singular.
if det(A) is non-zero, A_inverse do exist, there by matrix A is non-singular.
note: What if the matrix is rectangular matrix(m ≠ n ). In this case, there is no inverse exist. So a rectangular matrix can not be a singular or non-singular.
Since the determinent of A is non zero, the given matrix is a non singular.
matrix_elements = c(3,2,1,5,1,0,2,1,2,3,7,2,8,4,4,0)
MatrixA = matrix(matrix_elements,nrow=4, ncol=4)
print(MatrixA)
## [,1] [,2] [,3] [,4]
## [1,] 3 1 2 8
## [2,] 2 0 3 4
## [3,] 1 2 7 4
## [4,] 5 1 2 0
det(MatrixA)
## [1] 264
Since the determinent of A is 0, the given matrix is a singular( or non-invertible)
matrix_elements = c(2,1,-1,1,3,1,2,2,1,1,3,1,4,0,5,3)
MatrixA = matrix(matrix_elements,nrow=4, ncol=4)
print(MatrixA)
## [,1] [,2] [,3] [,4]
## [1,] 2 3 1 4
## [2,] 1 1 1 0
## [3,] -1 2 3 5
## [4,] 1 2 1 3
det(MatrixA)
## [1] 0