In R, if you have a matrix:

m1 <- matrix(c(2,2,2,2), ncol = 2)
m2 <- matrix(c(4,4,4,4), ncol = 2)

and you want to add/subtract/divide/multiple the two you simply:

m1 + m2
[,1] [,2]
[1,] 6 6
[2,] 6 6

If you store the inputted values in a list, you can refer to it inside the matrix function as above:

matrix(user_input, ncol = 2)
#or
matrix(c(ui1, ui2, ui3, ui4), ncol = 2)