Lets name first factor as matrix A and second as matrix B. These matrices cannot be multiplied because of the different numbers highlighted under the inverted commas >>>A (2x"9") and B("5" x 9) . But if you transpose the second matrix, it will be then B(9x5) Then you can multiply.