assignment completed to solve for invertible matrix.