Question asks us to determine if the sets of vectors are linearly independent or linearly dependent. If linearly dependent, exhibit a nontrivial relation of linear dependence
matA <- matrix(c(1,2,-1,0,1,3,2,-1,2,2,4,4,-2,2,3,-1,2,-1,-2,0), ncol = 4)
matA
## [,1] [,2] [,3] [,4]
## [1,] 1 3 4 -1
## [2,] 2 2 4 2
## [3,] -1 -1 -2 -1
## [4,] 0 2 2 -2
## [5,] 1 2 3 0
Simplifying the matrix into reduced row echelon form we get
matB <- matrix(c(1,-1,0,0,0,3,-1,1,0,0,4,-2,1,0,0,-1,-1,-1,0,0), ncol = 4)
matB
## [,1] [,2] [,3] [,4]
## [1,] 1 3 4 -1
## [2,] -1 -1 -2 -1
## [3,] 0 1 1 -1
## [4,] 0 0 0 0
## [5,] 0 0 0 0
Final RREF
matC <- matrix(c(1,0,0,0,0,0,1,0,0,0,1,1,0,0,0,2,-1,0,0,0), ncol = 4)
matC
## [,1] [,2] [,3] [,4]
## [1,] 1 0 1 2
## [2,] 0 1 1 -1
## [3,] 0 0 0 0
## [4,] 0 0 0 0
## [5,] 0 0 0 0
We can see that there are 2 pivot columns, so r=2. Since r is less than the number of columns, there are an infinite number or solutions so the vectors are LINEARLY DEPENDENT
X1 and X2 are our dependent variables and X3 and X4 are our free variables.
X1 = (-1)X3 + (-2)X4
X2 = (-1)X3 + (1)X4
By choosing values for our free variables we can find a linear combination of the vectors.
X3 = 2
X4 = 2
And substituting them into the equations, we find that a solution vector is
solVector <- c(6,0,0,0)
solVector
## [1] 6 0 0 0