Calculating the Inverse of a Matrix by LU Decomposition