Am I multiplying two matrices together correctly?
No. Let's first look at it as two dimensional arrays, so we know what we're talking about:

int i[4][4];
int j[4][4];
int k[4][4];

for (int x = 0; x &lt; 4; x++) { // row number of output
    for (int y = 0; y &lt; 4; y++) { // column number of output
        k[x][y] = 0;
        for (int z = 0; z &lt; 4; z++) { // four elements are added for this output
            k[x][y] += i[x][z] * j[z][y];
        }
    }
}


Important difference!!! We start at 0 for the indices!

Now I'll convert it to int[16]s for you assuming that i[1] is the second element of the first row:

int i[16];
int j[16];
int k[16];

for (int x = 0; x &lt; 4; x++) { // row number of output
    for (int y = 0; y &lt; 4; y++) { // column number of output
        k[4*x+y] = 0;
        for (int z = 0; z &lt; 4; z++) { // four elements are added for this output
            k[4*x+y] += i[4*x+z] * j[4*z+y];
        }
    }
}


This is equivalent to your code except for the fact that you start at 1 instead of zero.