Functions for matrix inversion were created