- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Easy way to remember Strassen's Matrix Equation in C++
It is a matrix multiplication algorithm is based on divide and conquer method. It is used to multiply two matrices of the same size,
Finding multiplication of two matrices−
The strassen’s Algorithm reduces overhead for multiplication by simplifying the multiplication.
Here is the multiplication made using the strassen’s Algorithm:
M1 = a*(f - h)
M2 = (a + b)*h
M3 = (c + d)*e
M4 = d*(g - e)
M5 = (a + d)*(e + h)
M6 = (b - d)*(g + h)
M7 = (a - c)*(e + f)
This can be easily remembered and the algorithm code can be decoded. For this we have a few rules, first remember these 6 things−
- Use AHED for the first 4 values of M.
- Use Diagonal multiplication for the 5th value of M.
- Use last CR (last col from mat 1 and last row form mat 2) for 6th value of M.
- Use first CR(first col from mat 1 and first row form mat 2) for 7th value of M.
- While considering elements of row add them and in case of columns subtract them.
- The update values after that using adjacent values.
Using these ways we can easily remember the values.
- Related Articles
- Easy way to remember Strassen's Matrix Equation in C++
- Easy way to re-order columns in MySQL?
- How to add mixed fractions in an easy way?
- How to use pip to install python modules in easy way?
- How will you explain Python namespaces in easy way?
- Snagit Tool: Taking Better Screenshots the Easy Way
- What is the easy way to make friends in a new school?
- Is there an easy way to rename a table in a MySQL procedure?
- Is there any easy way to add multiple records in a single MySQL query?
- Print Matrix in spiral way\n
- How to solve a circulant matrix equation using Python SciPy?
- Shortest Way to Form String in C++
- Way to increment a character in C#
- How to solve Hermitian positive-banded matrix equation using Python SciPy?
- Remember and Repopulate File Input in HTML5
- How to hack WhatsApp? Easy tricks.

Advertisements