Matrix Multiplication Calculator

Enter two matrices and get the product instantly. Supports fractions, variables, and shows the full working.

Matrix A

×

Supports decimals (0.75), variables (x, alpha), and expressions (2x + 1).

Matrix B

×

Supports decimals (0.75), variables (x, alpha), and expressions (2x + 1).

Result: A × B

2 × 2
-10
2
4
5
2 × 2
Step-by-step solution
  1. Step 1Setup
    A is 2×3, B is 3×2. Result C = A·B is 2×2.
    Each entry C[i][j] = sum over k of A[i][k] · B[k][j].
  2. Step 2C[1][1]
    (1)·(2) + (0)·(0) + (3)·(-4) = -10
  3. Step 3C[1][2]
    (1)·(-1) + (0)·(3) + (3)·(1) = 2
  4. Step 4C[2][1]
    (0)·(2) + (2)·(0) + (-1)·(-4) = 4
  5. Step 5C[2][2]
    (0)·(-1) + (2)·(3) + (-1)·(1) = 5

How matrix multiplication works

To multiply matrix A (size m×n) by matrix B (size n×p), the number of columns in A must equal the number of rows in B. Each entry of the resulting m×p matrix is the dot product of the corresponding row of A and column of B: (AB)ᵢⱼ = Σₖ AᵢₖBₖⱼ.

This calculator supports decimals like 0.75, variables like x or alpha, and full expressions like 2x + 1. Everything runs in your browser — no data is uploaded.

  • Order matters in general: A×B is usually different from B×A, and one may be undefined.
  • Result shape is easy to predict before computing: (m×n)·(n×p) always returns m×p.
  • Associative: (AB)C = A(BC), so chained products can be regrouped when dimensions match.
  • Distributive: A(B + C) = AB + AC and (A + B)C = AC + BC.
  • Identity and zero rules: AI = IA = A, and A0 = 0, 0A = 0.