Use of Submatrices If the original matrix is n x n, the four submatrices are n/2 x n/2 each; for simplicity we assume powers of two To find the result takes 8 multiplications and 4 additions; the complexity is (n3)
An Example a b e g c d f h We will only demo one level of recursion and multiply 2 x 2 matrices directly r = a e + b f
Example - continued s = a g + b h So the final result is t = c e + d f u = c g + d h
Strassen’s Method The method just shown has the recurrence For large n (in practice, n > 45) the greater number of additions, O(n2), is compensated for by one less multiplication, O(n3)
Overview of the Method This technique is not intuitive and the text develops some of the thought process that might have occurred, we only present the results here
Some Details
An Example a b e g c d f h We will only demo one level of recursion and multiply 2 x 2 matrices directly P1 = a ( g - h ) P2 = ( a + b ) h
Example - continued P3 = ( c + d ) e P4 = d ( e - f ) P5 = ( a + d ) ( e + h ) P6 = ( b - d ) ( f + h ) P7 = ( a - c ) ( e + g )
Example - continued s = P1 + P2 t = P3 + P4 r = P4 + P5 + P6 - P2 u = P1 + P5 - P3 - P7