# strassens matrix multiplication for getting square of a matrix

Using the same approach as of strassen's only 5 multiplications are sufficient to compute square of a matrix. A[2][2]=[a, b, c, d]. the multiplications are a* a, d* d, b(a+d), c(a+d), b*c.

If we generalise this algorithm for getting the square of a matrix. The complexity reduces to n^log5 with base 2.

I was asked a question to find what is wrong with this algorithm and when it fails?

For matrix multiplication, commutative law does not holds anymore. Then you would have $$BA + DB$$ and $$AC + CD$$ instead, which cannot be simplified into two multiplications.