Generalized Inverse of Matrices and Its Applications