Matrix Multiplication Calculator

Perform matrix multiplication by entering the elements of two matrices. The calculator will compute the product matrix.

This page exists due to the efforts of the following people:




Created: 2011-03-28 13:12:07, Last updated: 2023-05-27 14:14:28

Using the calculator

Enter the elements of Matrix A and Matrix B in the respective text fields, separating the elements by spaces and new lines. The calculator will compute the matrix product and display the result.

PLANETCALC, Matrix Multiplication

Matrix Multiplication

Digits after the decimal point: 2

Matrix Multiplication

The calculator performs matrix multiplication of two matrices, A and B. The product matrix, C, is obtained by multiplying the corresponding elements of the matrices as follows:
The matrixes A(m \times n) and B(n \times q) are defined as:
A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix},\;\;\; B = \begin{bmatrix} b_{11} & b_{12} & \cdots & b_{1q} \\ b_{21} & b_{22} & \cdots & b_{2q} \\ \vdots & \vdots & \ddots & \vdots \\ b_{n1} & b_{n2} & \cdots & b_{nq} \end{bmatrix}.

C = A \times B = \begin{bmatrix} c_{11} & c_{12} & \cdots & c_{1q} \\ c_{21} & c_{22} & \cdots & c_{2q} \\ \vdots & \vdots & \ddots & \vdots \\ c_{m1} & c_{m2} & \cdots & c_{mq} \end{bmatrix},

To compute each element of the product matrix, we take the dot product of the i-th row of matrix A and the j-th column of matrix B. The dot product is obtained by summing the products of corresponding elements:

c_{i,j} = \sum_{r=1}^n a_{i,r}b_{r,j} \;\;\; \left(i=1, 2, \ldots m;\;j=1, 2, \ldots q \right) - the summation is taken over the common dimension (r = 1 to n).

The dimensions of the matrices must satisfy (n × m)(m × p) = (n × p) for matrix multiplication to be defined.

Please note that matrix multiplication is not commutative, except when both matrices are diagonal and have the same dimension.

URL copied to clipboard
PLANETCALC, Matrix Multiplication Calculator