Question: Error in writing own function

M:= Matrix ([[a,b], [c,d]])

If a.d-b.c=0 then print (Matrix(2)); else print (Matrix ([[(d/a.d-b.c), (-b/a.d-b.c)], [-c/a.d-b.c, a/a.d-b.c]]); end if;

 

I don't understand where I have gone wrong. If anybody could help I would be greatly appreciative

Thank you

Please Wait...