Matrix Multiplication Calculator
Select the dimensions of each matrix and enter their elements to calculate the product AB step by step.
Quick Examples
How to Use the Calculator
This online matrix multiplication solver is a linear algebra tool designed to calculate the product between two matrices (A and B). Besides giving you the resulting matrix, the system generates the entire step-by-step mathematical process so you can understand the calculation procedure for each element.
Setup and data entry:
- Matrix dimensions: On the screen, you will find two independent blocks, one for matrix A and another for matrix B. Use the individual selectors to define the number of rows and columns for each. The tool supports dimensions ranging from 1 to 6 (for example, from a 1x3 row vector to a 6x6 square matrix).
- Compatibility rule: By mathematical definition, two matrices can only be multiplied if the number of columns in matrix A equals the number of rows in matrix B. If you enter incompatible dimensions, the algorithm will show an alert warning you of the error so you can correct it.
- Element entry: Fill the cells with your data. The algebraic engine is flexible and supports integers, decimals, and exact fractions. We suggest entering the values of your exercise in their original format so the tool works analytically and avoids rounding errors.
Once the data is entered and validated, the calculator will process the operation and structure the results into two main sections:
1. Quick answer
In the first highlighted block, you will directly find the final result of the multiplication (AB). This result box is ideal if you are looking to quickly verify the solution to your exercises.
2. Step-by-step solution
Following the direct answer, the detailed procedure will be displayed. To teach you how the matrix product is performed, the system will show the following sequence:
- Analysis of the resulting dimensions: The algorithm will explain how to deduce the size of the final matrix, taking the number of rows of A and the number of columns of B.
- Schema assembly: A matrix will be constructed to serve as a guide, indicating each element to be calculated (c11, c12, c13...).
- Individual calculation by element: The system will analytically break down how each component of the resulting matrix is obtained. You will see how each element of a specific row in matrix A is multiplied by the elements of the corresponding column in matrix B, and how those products are summed.
- Final assembly: In the last step, all individual results will be placed within the previously generated schema, constructing the simplified final matrix.
Solved Exercises
The following are examples of problems solved by the calculator.
Exercise 1
Multiply the 2x3 matrix A by the 3x2 matrix B:
$$ \displaystyle A = \begin{bmatrix} 1 & -1 & 2 \\[0.6em] 0 & 3 & 4 \end{bmatrix} \quad B = \begin{bmatrix} 2 & 1 \\[0.6em] -1 & 0 \\[0.6em] 3 & -2 \end{bmatrix} $$
Result
The result of multiplying matrices A and B is the following 2x2 matrix:
Step-by-step solution
1. Determine the dimensions of the new matrix.
Matrix A has dimensions 2x3 and matrix B has dimensions 3x2. Since the number of columns of A (3) equals the number of rows of B (3), multiplication is possible. The product matrix AB will have the dimensions resulting from the rows of A and the columns of B: 2x2.
Each element cij of the resulting matrix is calculated by multiplying each term in row i of A by the corresponding element in column j of B in order, and summing the results.
2. Calculate each element of the product matrix.
Calculation of c11
To obtain the element c11, we take row 1 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c12
To obtain the element c12, we take row 1 of matrix A and column 2 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c21
To obtain the element c21, we take row 2 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c22
To obtain the element c22, we take row 2 of matrix A and column 2 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
3. Construct the final matrix.
Having the values of all the elements, we determine that the resulting product matrix is:
Exercise 2
Calculate the product of the following 2x2 square matrices:
$$ \displaystyle A = \begin{bmatrix} 1 & 2 \\[0.6em] 3 & 4 \end{bmatrix} \quad B = \begin{bmatrix} 2 & 0 \\[0.6em] 1 & 2 \end{bmatrix} $$
Result
The product of multiplying matrices A and B generates the following 2x2 matrix:
Step-by-step solution
1. Determine the dimensions of the new matrix.
Given that matrix A has dimensions 2x2 and matrix B has dimensions 2x2, we verify that the number of columns in A (2) matches the rows in B (2). Consequently, multiplication is viable and will result in a 2x2 matrix AB.
Each element cij of the resulting matrix is calculated by multiplying each term in row i of A by the corresponding element in column j of B in order, and summing the results.
2. Calculate each element of the product matrix.
Calculation of c11
To obtain the element c11, we take row 1 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c12
To obtain the element c12, we take row 1 of matrix A and column 2 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c21
To obtain the element c21, we take row 2 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c22
To obtain the element c22, we take row 2 of matrix A and column 2 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
3. Construct the final matrix.
Having the values of all the elements, we determine that the resulting product matrix is:
Exercise 3
Find the product between the 3x3 matrices:
$$ \displaystyle A = \begin{bmatrix} \frac{1}{2} & 0 & 1 \\[0.6em] \frac{1}{3} & -1 & 2 \\[0.6em] 0 & \frac{1}{4} & -2 \end{bmatrix} \quad B = \begin{bmatrix} 2 & -1 & 0 \\[0.6em] 1 & \frac{1}{2} & -1 \\[0.6em] 3 & 0 & 2 \end{bmatrix} $$
Result
By performing the multiplication operation A · B, the following 3x3 matrix is obtained:
Step-by-step solution
1. Determine the dimensions of the new matrix.
Given that matrix A has dimensions 3x3 and matrix B has dimensions 3x3, the multiplicability condition is met (columns of A equal rows of B: 3). Therefore, the product matrix AB will have a 3x3 structure.
Each element cij of the resulting matrix is calculated by multiplying each term in row i of A by the corresponding element in column j of B in order, and summing the results.
2. Calculate each element of the product matrix.
Calculation of c11
To obtain the element c11, we take row 1 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c12
To obtain the element c12, we take row 1 of matrix A and column 2 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c13
To obtain the element c13, we take row 1 of matrix A and column 3 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c21
To obtain the element c21, we take row 2 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c22
To obtain the element c22, we take row 2 of matrix A and column 2 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c23
To obtain the element c23, we take row 2 of matrix A and column 3 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c31
To obtain the element c31, we take row 3 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c32
To obtain the element c32, we take row 3 of matrix A and column 2 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c33
To obtain the element c33, we take row 3 of matrix A and column 3 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
3. Construct the final matrix.
Having the values of all the elements, we determine that the resulting product matrix is:
Exercise 4
Determine the product of the 3x3 matrix A and the 3x1 column matrix B:
$$ \displaystyle A = \begin{bmatrix} 2 & 1 & -1 \\[0.6em] -3 & -1 & 2 \\[0.6em] -2 & 1 & 2 \end{bmatrix} \quad B = \begin{bmatrix} 8 \\[0.6em] -11 \\[0.6em] -3 \end{bmatrix} $$
Result
The matrix multiplication of A by B results in the following 3x1 column matrix:
Step-by-step solution
1. Determine the dimensions of the new matrix.
We observe that matrix A has dimensions 3x3 while matrix B has dimensions 3x1. Since the columns of A (3) exactly match the rows of B (3), it is possible to perform the product, resulting in a 3x1 matrix AB.
Each element cij of the resulting matrix is calculated by multiplying each term in row i of A by the corresponding element in column j of B in order, and summing the results.
2. Calculate each element of the product matrix.
Calculation of c11
To obtain the element c11, we take row 1 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c21
To obtain the element c21, we take row 2 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
Calculation of c31
To obtain the element c31, we take row 3 of matrix A and column 1 of matrix B. We multiply their corresponding elements position by position (first by first, second by second, etc.) and sum the results.
3. Construct the final matrix.
Having the values of all the elements, we determine that the resulting product matrix is:
