E = matrix(nrow = 3, ncol = 3, data = c(1, 1, 0, 1, -1, 0, -1, -1, 1)) D = c(-1, -1, 2) solve(E, D)
## [1] 1 0 2