I have two 2x2 arrays a & b.<br>a=(([c,d],[e,f]))<br>b=(([g,h],[i,j]))<br>Each of c,d,e,f,g,h,i,j are all 1xN arrays<br>I want to matrix multiply a & b to create a 2x2 array x, where the elements of x are created with element-wise math and result in the following:<br>
x[0,0] = c*g+d*i<br>x[0,1] = c*h+d*j<br>x[1,0] = e*g+f*i<br>x[1,1] = e*h+f*j<br><br>What is the simplest way to do this? I ended up doing the matrix multiplication manually as above but this doesn't scale very nicely if a & b become larger size.<br>
<br>Cheers,<br><br>Jonno.<br>-- <br>"If a theory can't produce hypotheses, can't be tested, can't be disproven, and can't make predictions, then it's not a theory and certainly not science." by spisska on Slashdot, Monday April 21, 2008