inverse matrix

added functional code