 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
      cofactI.c : cofactor.
      mcfactI.c : cofactors matrix.
        adjtI.c : adjoint.
         invI.c : inverse.
      inv_xhI.c : inverse another method
       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
      inv_xhIR.c : inverse another method
       gssjdIR.c : gauss jordan
