> x<-c(1,2,1,1,-1,-2,1,-1,2,3,1,4,-1,-3,0,3) > A<-matrix(x,ncol=4) > A [,1] [,2] [,3] [,4] [1,] 1 -1 2 -1 [2,] 2 -2 3 -3 [3,] 1 1 1 0 [4,] 1 -1 4 3 > b<-c(-8,-20,-2,4) > solve(A,b) [1] -7 3 2 2 >