one point of caution of using the program in the link by kooth. If you are going to multiply complex numbers, though the idea is the same, if your matrix is nXn matrix where n >30, the complexity of this nature leads to a very slow program..try using openmp threading. Just a suggestion.