TFT

Matrix Multiplication Calculator

Multiply two matrices (A × B)

Matrix Multiplication Calculator – Multiply Two Matrices

Multiply two matrices with our free online matrix multiplication calculator. Enter values via textarea or row-by-row input with step-by-step results.

or custom×

Current Matrix A: 2×2

or custom×

Current Matrix B: 2×2

What is Matrix Multiplication?

Matrix multiplication is a binary operation that takes two matrices and produces another matrix. For matrices A (m×n) and B (n×p), the product C = AB has dimensions m×p. Each element cᵢⱼ is computed as the dot product of row i of A and column j of B.

Matrix multiplication requires that the number of columns in the first matrix equals the number of rows in the second matrix.

Matrix Multiplication Formula

General Formula

If A is (m×n) and B is (n×p), then C = AB where cᵢⱼ = Σ(k=1 to n) aᵢₖ × bₖⱼ

Each element is the dot product of a row from A and a column from B

2×2 Example

[a b] [e f] [ae+bg af+bh]
[c d] × [g h] = [ce+dg cf+dh]

Dimension Rule

(m×n) × (n×p) = (m×p)

Example: (2×3) × (3×4) = (2×4)

Properties of Matrix Multiplication

Key Properties

  • Not Commutative: AB ≠ BA (generally)
  • Associative: (AB)C = A(BC)
  • Distributive: A(B+C) = AB + AC
  • Identity: AI = IA = A

Requirements

  • • Columns of A must equal rows of B
  • • Result has rows of A and columns of B
  • • Order matters (AB ≠ BA)
  • • Can multiply a matrix by itself if square

Frequently Asked Questions

Why must columns of A equal rows of B?

Each element in the result is a dot product of a row from A and a column from B. Dot products require vectors of equal length. If A has n columns, B must have n rows.

Is matrix multiplication commutative?

Generally no. AB ≠ BA for most matrices. Even when both products are defined, they usually give different results. Exception: multiplying by identity or scalar matrices.

What is the identity matrix?

An identity matrix has 1s on the diagonal and 0s elsewhere. Multiplying any matrix by the identity gives the original matrix unchanged. It's the matrix equivalent of multiplying by 1.

Can I multiply a matrix by itself?

Yes, if the matrix is square (same rows and columns). A² = A × A is common in Markov chains and computing matrix powers for transformations.