For problems C10–C19, find all solutions to the system of linear equations. Use your favorite computing device to row-reduce the augmented matrices for the systems, and write the solutions as a set, using correct set notation.

Problem C10

Traditional Method Matrix

A=matrix(c(2,-3,1,7,2,8,-4,5,1,3,-3,0,-5,2,3,4),nrow=4,byrow=TRUE)
b=matrix(c(14,-1,4,-19), nrow=4)
#solve(A,b)


print(A) 
##      [,1] [,2] [,3] [,4]
## [1,]    2   -3    1    7
## [2,]    2    8   -4    5
## [3,]    1    3   -3    0
## [4,]   -5    2    3    4

Using Solve

solve(A,b)
##      [,1]
## [1,]    1
## [2,]   -3
## [3,]   -4
## [4,]    1

PRACMA

require(pracma)
augA=matrix(c(2, -3, 1, 7, 14,2,8,-4,5,-1, 1,3,-3,0,4, -5, 2, 3, 4,-19),nrow=4,byrow=TRUE)
augA
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    2   -3    1    7   14
## [2,]    2    8   -4    5   -1
## [3,]    1    3   -3    0    4
## [4,]   -5    2    3    4  -19
rref(augA)
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    0    0    0    1
## [2,]    0    1    0    0   -3
## [3,]    0    0    1    0   -4
## [4,]    0    0    0    1    1

\[ S =\begin{pmatrix} 1 \\ -3 \\ -4 \\ 1\\ \end{pmatrix}\]

Bonus Echelon Form - With Steps

require(matlib)
echelon(A,b, verbose = TRUE, fractions = TRUE)
## 
## Initial matrix:
##      [,1] [,2] [,3] [,4] [,5]
## [1,]   2   -3    1    7   14 
## [2,]   2    8   -4    5   -1 
## [3,]   1    3   -3    0    4 
## [4,]  -5    2    3    4  -19 
## 
## row: 1 
## 
##  exchange rows 1 and 4 
##      [,1] [,2] [,3] [,4] [,5]
## [1,]  -5    2    3    4  -19 
## [2,]   2    8   -4    5   -1 
## [3,]   1    3   -3    0    4 
## [4,]   2   -3    1    7   14 
## 
##  multiply row 1 by -1/5 
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1 -2/5 -3/5 -4/5 19/5
## [2,]    2    8   -4    5   -1
## [3,]    1    3   -3    0    4
## [4,]    2   -3    1    7   14
## 
##  multiply row 1 by 2 and subtract from row 2 
##      [,1]  [,2]  [,3]  [,4]  [,5] 
## [1,]     1  -2/5  -3/5  -4/5  19/5
## [2,]     0  44/5 -14/5  33/5 -43/5
## [3,]     1     3    -3     0     4
## [4,]     2    -3     1     7    14
## 
##  subtract row 1 from row 3 
##      [,1]  [,2]  [,3]  [,4]  [,5] 
## [1,]     1  -2/5  -3/5  -4/5  19/5
## [2,]     0  44/5 -14/5  33/5 -43/5
## [3,]     0  17/5 -12/5   4/5   1/5
## [4,]     2    -3     1     7    14
## 
##  multiply row 1 by 2 and subtract from row 4 
##      [,1]  [,2]  [,3]  [,4]  [,5] 
## [1,]     1  -2/5  -3/5  -4/5  19/5
## [2,]     0  44/5 -14/5  33/5 -43/5
## [3,]     0  17/5 -12/5   4/5   1/5
## [4,]     0 -11/5  11/5  43/5  32/5
## 
## row: 2 
## 
##  multiply row 2 by 5/44 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1   -2/5   -3/5   -4/5   19/5
## [2,]      0      1  -7/22    3/4 -43/44
## [3,]      0   17/5  -12/5    4/5    1/5
## [4,]      0  -11/5   11/5   43/5   32/5
## 
##  multiply row 2 by 2/5 and add to row 1 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0  -8/11   -1/2  75/22
## [2,]      0      1  -7/22    3/4 -43/44
## [3,]      0   17/5  -12/5    4/5    1/5
## [4,]      0  -11/5   11/5   43/5   32/5
## 
##  multiply row 2 by 17/5 and subtract from row 3 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0  -8/11   -1/2  75/22
## [2,]      0      1  -7/22    3/4 -43/44
## [3,]      0      0 -29/22   -7/4 155/44
## [4,]      0  -11/5   11/5   43/5   32/5
## 
##  multiply row 2 by 11/5 and add to row 4 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0  -8/11   -1/2  75/22
## [2,]      0      1  -7/22    3/4 -43/44
## [3,]      0      0 -29/22   -7/4 155/44
## [4,]      0      0    3/2   41/4   17/4
## 
## row: 3 
## 
##  exchange rows 3 and 4 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0  -8/11   -1/2  75/22
## [2,]      0      1  -7/22    3/4 -43/44
## [3,]      0      0    3/2   41/4   17/4
## [4,]      0      0 -29/22   -7/4 155/44
## 
##  multiply row 3 by 2/3 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0  -8/11   -1/2  75/22
## [2,]      0      1  -7/22    3/4 -43/44
## [3,]      0      0      1   41/6   17/6
## [4,]      0      0 -29/22   -7/4 155/44
## 
##  multiply row 3 by 8/11 and add to row 1 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0      0 295/66 361/66
## [2,]      0      1  -7/22    3/4 -43/44
## [3,]      0      0      1   41/6   17/6
## [4,]      0      0 -29/22   -7/4 155/44
## 
##  multiply row 3 by 7/22 and add to row 2 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0      0 295/66 361/66
## [2,]      0      1      0 193/66  -5/66
## [3,]      0      0      1   41/6   17/6
## [4,]      0      0 -29/22   -7/4 155/44
## 
##  multiply row 3 by 29/22 and add to row 4 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0      0 295/66 361/66
## [2,]      0      1      0 193/66  -5/66
## [3,]      0      0      1   41/6   17/6
## [4,]      0      0      0 479/66 479/66
## 
## row: 4 
## 
##  multiply row 4 by 66/479 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0      0 295/66 361/66
## [2,]      0      1      0 193/66  -5/66
## [3,]      0      0      1   41/6   17/6
## [4,]      0      0      0      1      1
## 
##  multiply row 4 by 295/66 and subtract from row 1 
##      [,1]   [,2]   [,3]   [,4]   [,5]  
## [1,]      1      0      0      0      1
## [2,]      0      1      0 193/66  -5/66
## [3,]      0      0      1   41/6   17/6
## [4,]      0      0      0      1      1
## 
##  multiply row 4 by 193/66 and subtract from row 2 
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    0    0    0    1
## [2,]    0    1    0    0   -3
## [3,]    0    0    1 41/6 17/6
## [4,]    0    0    0    1    1
## 
##  multiply row 4 by 41/6 and subtract from row 3 
##      [,1] [,2] [,3] [,4] [,5]
## [1,]  1    0    0    0    1  
## [2,]  0    1    0    0   -3  
## [3,]  0    0    1    0   -4  
## [4,]  0    0    0    1    1