PDA

View Full Version : multiplying 2-d arrays (i.e. matrix multiplication)


clharri23
12-08-2009, 01:56 AM
How would I setup the for loops to multiply two 2-d arrays (the first a 2 x 2, and the second a 2 x 2) as if each array was a matrix?

cs_student
12-08-2009, 02:26 AM
Do you know how to multiply matrices (http://en.wikipedia.org/wiki/Matrix_%28mathematics%29#Matrix_multiplication.2C_linear_equations_and_linear_transformations)?

Maybe consider trying to implement one of the more efficient matrix multiplication algorithms (http://en.wikipedia.org/wiki/Matrix_multiplication#Algorithms_for_efficient_matrix_multiplication).

Whatever you decide to do, if you are having trouble please post back here with any relevant code of what you have tried.


cs_student