Ouch, the above writeups must be hard for some to follow. Multiplying matrices can easily be done by lining your two matrices up and hacking away at it, and it works in no time at all.
Before starting, you must look at your two matrices to determine if you can multiply them. Two matrices are only able to be multiplied if the first matrix has the same number of columns as the second one does rows:
If the matrices M is aXb (a by b) and N is cXd, b=c must be true to multiply. The resulting matrix will have dimensions of aXd.
M= 3 2 N= 4 5 2 3
4 4 1 3 8 6
8 5
M is 3x2, and N is 2x4. 2=2, so they work. The resulting matrix will be 3x4.
Start with row one of M {3,2} and column one of N {4,1}. Multiply the first two numbers (3 and 4) and multiply the second two (2 and 1). Add the results:
(3*4)+(2*1)=12+2=14
The item in the first row and first column of the new matrix (MN) is 14.
Now, do the same procedure (keeping with the same row from M) for every column in N. The results will compromise the first row of MN. After that, go to the second row of M, doing the multiplication procedure for every column in N again, and keep going until you run out of rows in M.
MN= (3*4)+(2*1) | (3*5)+(2*3) | (3*2)+(2*8) | (3*3)+(2*6)
------------+-------------+-------------+------------
(4*4)+(4*1) | (4*5)+(4*3) | (4*2)+(4*8) | (4*3)+(4*6)
------------+-------------+-------------+------------
(8*4)+(5*1) | (8*5)+(5*3) | (8*2)+(5*8) | (8*3)+(5*6)
MN= 14 | 21 | 32 | 21
---+----+----+---
20 | 32 | 40 | 36
---+----+----+---
37 | 55 | 56 | 54
If variables make more sense to you, here's another representation:
M= a b
c d
e f
N= z y x w
v u t s
MN= (a*z)+(b*v) | (a*y)+(b*u) | (a*x)+(b*t) | (a*w)+(b*s)
------------+-------------+-------------+------------
(c*z)+(d*v) | (c*y)+(d*u) | (c*x)+(d*t) | (c*w)+(d*s)
------------+-------------+-------------+------------
(e*z)+(f*v) | (e*y)+(f*u) | (e*x)+(f*t) | (e*w)+(f*s)
Final note: matrix multiplication is not commutative. That is, AB does not necessarily equal BA. Also, while AB may be possible, if the number of rows in A does not equal the number of columns in B, then BA is not possible. Weird, huh?