Matrix Multiplication using Strassen's Algorithm

Matrix A

|

|

|

|

Matrix B

×
Create
Multiply

Step 1. Padding the matrix with zeroes to obtain the matrix sizes to a nearest power of 2.

×
Next

Step 2. Obtain the Sub-matrices of size N/2.

A11
A12
A21
A22
×
B11
B12
B21
B22
Next

Step 3. Calculate the seven formulas using the sub matrices.

Strassen Formula

M1

=>
+
x
+
=

M2

=>
+
x
=

M3

=>
x
-
=

M4

=>
x
-
=

M5

=>
+
x
=

M6

=>
-
x
+
=

M7

=>
-
x
+
=
Next

Step 4. Calculate the Sub matrices of C using the formulae.

Strassen Formula

C11

=>
+
-
+
=

C12

=>
+
=

C21

=>
+
=

C22

=>
-
+
+
=
Next

Step 5. Obtaining the Final resultant matrix

C'

=>

C

=>
Final