Matrix Multiplication
If A=(a_i,j) and B=(b_i,j) are square matrices of order n, then C=(c_i,j)=AB is also a square matrix and c_i,j is obtained by taking the dot product of the ith row of A with the jth column of B
c_ij = a_i,0*b0,j + a_i,1*b_1,j + … + a_i,n-1*b_n-1,j
for (j = 0; j < n; j++) {
C[i][j] = C[i][j] + A[i][k]*B[k][j];
} /* Serial_matrix_mult */