Matrix Multiplication Calculator









Let's learn about matrix multiplication with an example!


Imagine two matrices:


A = [2 1]

      [-3 4]


B = [5 -2]

      [1 0]

To multiply these (A x B), we can use a special formula:


For each element (Cij) in the resulting matrix (C):


  • Select a row (i) in A and a column (j) in B.
  • Multiply each element in the selected row of A by the corresponding element in the selected column of B.
  • Sum up all those products.


That’s it! Siege is the result of this combination.


In our case, both matrices have dimensions 2x2, so n (number of columns in A) is equal to the number of rows in B. Now, let's enumerate each element in C:


C11 = (25) + (11) = 11

C12 = (2*-2) + (1*0) = -4

C21 = (-35) + (41) = -11

C22 = (-3*-2) + (4*0) = 6

Putting all this together, our resulting matrix (C) is:


C = [11 -4]

      [-11 6]

Matrix Multiplication Calculator

Comments