 Try the examples in this order.

 I have put the code of the functions into the h file, to simplify the work.
 To compile addm.c :   gcc -o addm addm.c

            I   * Integer
        addmI.c : Add two matrices.
        submI.c
       multmI.c : multiply two matrices.
        powmI.c   multiply a matrix by itself, (A**0 = id, A**1 = A, A**2 = A*A, ..)
      smultmI.c : multiply a scalar by a matrice.
      transpI.c : transpose.
       traceI.c
         detI.c : Determinant.
       minorI.c
      mminorI.c : minor matrix.
      cofactI.c : cofactor.
      mcfactI.c : cofactors matrix.
        adjtI.c : adjoint.
         invI.c : inverse. (use     adjoint())
     inv_gjdI.c : inverse  (use gaussjordan())
      inv_xhI.c : inverse  (use the work on identity matrix)
       gssjdI.c : gauss jordan.

             R   * Random
        addmIR.c : Add two matrices.
        submIR.c
       multmIR.c : multiply two matrices.
        powmIR.c   multiply a matrix by itself, (A**0 = id, A**1 = A, A**2 = A*A, ..)
      smultmIR.c : multiply a scalar by a matrice.
      transpIR.c : transpose
       traceIR.c
         detIR.c : Determinant.
         invIR.c : inverse. (use     adjoint())
     inv_gjdIR.c : inverse  (use gaussjordan())
      inv_xhIR.c : inverse  (use the work on identity matrix)
       gssjdIR.c : gauss jordan
