Go to content messages.homepage.accessibility

Matrix multiplication

1. Original procedure of the algorithm

To multiply two matrices A, B (in the order as they are listed), it is necessary to meet the following requirement: the number of columns of the first matrix must be the same as the number of rows of the second matrix. If this condition is fulfilled, we usually write both matrices A, B one beside the other and leave some space on the right for the third resulting matrix C = A \cdot B. Computing the value of the matrix C in the row i and the column j, we follow the row i of the matrix A and the column j of the matrix B. We multiply relevant values and add these semi-results afterwards. The result of the addition is inserted into the given position of the matrix C.

We provide an Example 1 to make the algorithm more comprehensible:

Example 1: One step of algorithm
  • https://www.teiresias.muni.cz/amalg/www/images/animation/MatrixMultiplication/matrix_norm24_1.jpg
  • Two matrices A, B are displayed, the first of them is 2-by-3, the second is 3-by-4.
  •  Do not display this label
Animation 1: calculating a value of a specific position

2. Proposals of adaptation

3. Discussion of pros and cons