Matrix Inversion via LU Factorization