Nothing but the usual matrix multiplication function you create by yourself
this is multiplies A and B yielding product matrix C with the dimension in order
void mat_prod(double c[M][P], double a[M][N],
double b[N][P])
{
int i,j,k;
for (i=0; i<M; ++i)
for (j=0; j<P; ++j)
{ c{i][j] = 0;
for (k=0; k<N; ++k)
c[j] += a[k] * b[k][j];
}
}