Added function body for matrix creation and inversion
Added comment