## a matrix
x=diag(1:4)
## invert this matrix
solve(x)
## matrix in Z/7Z
y = as.bigz(x,7)
## invert this matrix (result is not the same as solve(x))
solve(y)
## matrix in Q
z = as.bigq(x)
## invert this matrix (result is the same as solve(x))
solve(z)Run the code above in your browser using DataLab