Matrix Multiplication Calculator

Multiply two matrices and see the step-by-step calculation process.

Matrix A
1
2
1
2
Matrix B
1
2
3
1
2
A × B
CC==A×BA \times B
==[12x3x24x3]×[5678910]\begin{bmatrix}1 & 2x\\ 3x^2 & 4x^3\end{bmatrix} \times \begin{bmatrix}5 & 6 & 7\\ 8 & 9 & 10\end{bmatrix}
C1,1C_{1,1}==(1×5)+(2x×8)=16x+5(1 \times 5) + (2x \times 8) = 16x+5
C1,2C_{1,2}==(1×6)+(2x×9)=18x+6(1 \times 6) + (2x \times 9) = 18x+6
C1,3C_{1,3}==(1×7)+(2x×10)=20x+7(1 \times 7) + (2x \times 10) = 20x+7
C2,1C_{2,1}==(3x2×5)+(4x3×8)=32x3+15x2(3x^2 \times 5) + (4x^3 \times 8) = 32x^3+15x^2
C2,2C_{2,2}==(3x2×6)+(4x3×9)=36x3+18x2(3x^2 \times 6) + (4x^3 \times 9) = 36x^3+18x^2
C2,3C_{2,3}==(3x2×7)+(4x3×10)=40x3+21x2(3x^2 \times 7) + (4x^3 \times 10) = 40x^3+21x^2
CC==[16x+518x+620x+732x3+15x236x3+18x240x3+21x2]\begin{bmatrix}16x+5 & 18x+6 & 20x+7\\ 32x^3+15x^2 & 36x^3+18x^2 & 40x^3+21x^2\end{bmatrix}

Matrix Multiplication Calculator Features

  • Algebraic Expression Support: Enter variables and algebraic expressions (like 2x2x or x+2yx + 2y) directly in matrix cells to perform symbolic multiplication.
  • Step-by-Step Calculation: View the complete calculation process for each element in the resulting matrix, showing exactly how each value is computed.
  • Dynamic Matrix Sizing: Adjust matrix dimensions on the fly to work with matrices of any compatible size.
  • Interactive Highlighting: Click on any matrix cell to see which elements are used in the calculation, highlighted in bold throughout the step-by-step breakdown.
  • Automatic Simplification: The calculator automatically simplifies algebraic expressions in the results, making complex calculations easier to understand.

What is Matrix Multiplication?

Matrix multiplication is a binary operation that produces a matrix from two matrices. For matrices AA and BB, the product C=A×BC = A \times B is defined only when the number of columns in AA equals the number of rows in BB.

If AA is an m×nm \times n matrix and BB is an n×pn \times p matrix, then their product CC will be an m×pm \times p matrix.

How Does it Work?

Each element in the resulting matrix is computed by taking the dot product of the corresponding row from the first matrix and column from the second matrix.

Given:
  • Matrix AA of size m×nm \times n and Matrix BB of size n×pn \times p.
C=A×BCi,j=k=1nAi,k×Bk,j=(Ai,1×B1,j)+(Ai,2×B2,j)++(Ai,n×Bn,j)\begin{aligned} C &= A \times B\\ C_{i,j} &= \sum_{k=1}^{n} A_{i,k} \times B_{k,j} \\ &= (A_{i,1} \times B_{1,j}) + (A_{i,2} \times B_{2,j}) + \cdots + (A_{i,n} \times B_{n,j}) \end{aligned}
Where:
  • ii is the row index (1im1 \leq i \leq m) and jj is the column index (1jp1 \leq j \leq p).

Key Properties

Matrix multiplication has several important properties, some of them being different from regular number multiplication:

  • Non-Commutative: In general, A×BB×AA \times B \neq B \times A. The order of multiplication matters and changing it usually produces different results.
  • Associative: (A×B)×C=A×(B×C)(A \times B) \times C = A \times (B \times C). You can regroup matrix multiplications without changing the result.
  • Distributive: A×(B+C)=A×B+A×CA \times (B + C) = A \times B + A \times C and (A+B)×C=A×C+B×C(A + B) \times C = A \times C + B \times C. Matrix multiplication distributes over addition.
  • Identity Element: Multiplying by an identity matrix II leaves the matrix unchanged: A×I=I×A=AA \times I = I \times A = A.

Common Examples

Identity Matrix

An identity matrix II has ones on the main diagonal and zeros elsewhere. Multiplying any matrix by an appropriately sized identity matrix returns the original matrix:

[1001]×[abcd]=[abcd]\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \times \begin{bmatrix} a & b \\ c & d \end{bmatrix} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}

Scalar Multiplication

When you multiply a scalar (regular number) by a matrix, it multiplies every element in the matrix. For example:

3×[1234]=[3×13×23×33×4]=[36912]3 \times \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} = \begin{bmatrix} 3 \times 1 & 3 \times 2 \\ 3 \times 3 & 3 \times 4 \end{bmatrix} = \begin{bmatrix} 3 & 6 \\ 9 & 12 \end{bmatrix}

Screenshot

Here is a screenshot of the calculator in action:

matrixmultiplicationcalculator.com Screenshot