Maple has its own function you can call, but i'm guessing you want to write one yourself?
Is your matrix a fixed order?
Yes, you're right, I need a code, either mine or not, it even may be in Maple's library, but I need the explicit code so as to be able to explain it and how it works.
It must be for any matrix order (I could for n<=4, but further i think I'd be quickly lost, and for any size, I don't manage ...)
If you need only to code it for 2x2, 3x3 or 4x4 then your function could have the matrix as the input, firstly it should find the order, if the order is not 2x2, 3x3 or 4x4 then return an error message other wise find the determinant using hardcoded calcs and the matrix elements.
Psuedo Code could be:
Find Order (count rows, count columns) for mxn matirx
If m not equal to n or n,m >4, return an error
if m=2, then a11*a22-a12*a21
if m=3, then a11*(a22*a33-a32*a23)+...
if m=4, then .....