MathematicsLinear AlgebraMedium

Matrix Multiplication

Also known as:Matrix product

Matrix multiplication is a binary operation that takes an m×n matrix A and an n×p matrix B and produces an m×p matrix C, where each entry Cᵢⱼ is the dot product of the i-th row of A with the j-th column of B. Unlike scalar multiplication, matrix multiplication is not commutative (AB ≠ BA in general) but is associative and distributive. It represents the composition of linear transformations and is the central computational operation in linear algebra, computer graphics, neural networks, and the numerical solution of differential equations.

Key Formula

(AB)_ij = sum over k of a_ik * b_kj

LaTeX: (AB)_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj}

SymbolMeaningUnit
Am×n matrix
Bn×p matrix
a_{ik}Entry in row i, column k of A
b_{kj}Entry in row k, column j of B
(AB)_{ij}Entry in row i, column j of product C

Worked Example

Problem

Compute AB where A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]].

Solution

Step 1: A is 2×2 and B is 2×2; result C is 2×2. Step 2: C₁₁ = (1)(5) + (2)(7) = 5 + 14 = 19. Step 3: C₁₂ = (1)(6) + (2)(8) = 6 + 16 = 22. Step 4: C₂₁ = (3)(5) + (4)(7) = 15 + 28 = 43. Step 5: C₂₂ = (3)(6) + (4)(8) = 18 + 32 = 50.

Answer

AB = [[19, 22], [43, 50]].

Properties of Matrix Multiplication

PropertyStatementHolds?
Associativity(AB)C = A(BC)Yes
CommutativityAB = BANo (generally)
DistributivityA(B + C) = AB + ACYes
Identity elementAI = IA = AYes
Zero productAB = 0 implies A=0 or B=0No
Transpose of product(AB)ᵀ = BᵀAᵀYes

Interactive Tools

Wolfram Alpha — Matrix Multiplication

Open Tool

Khan Academy — Matrix Multiplication

Open Tool

Desmos — Matrix Calculator

Open Tool
Diagram illustrating how each entry of the product matrix is computed as a dot product

Wikimedia Commons, CC BY-SA

Related Terms

Mathematics

Matrix (Linear Algebra)

A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns, where an m×n matrix has m rows and n columns. Matrices represent linear transformations between vector spaces, encode systems of linear equations, and serve as the primary computational tool in linear algebra. They are indispensable across engineering, physics, computer science, statistics, and machine learning, where they model data, rotations, reflections, and the weights of neural networks.

Mathematics

Determinant

The determinant is a scalar value computed from a square matrix that encodes whether the linear transformation represented by the matrix is invertible, scaling the volume by a factor equal to the absolute value of the determinant and changing orientation if the determinant is negative. For a 2×2 matrix, det(A) = ad − bc; for larger matrices, it is computed recursively via cofactor expansion or row reduction. The determinant is zero if and only if the matrix is singular (non-invertible), making it a critical tool in solving linear systems, computing eigenvalues, and computing cross products in geometry.

Mathematics

Eigenvalue

An eigenvalue of a square matrix A is a scalar λ such that there exists a non-zero vector v (its eigenvector) satisfying Av = λv, meaning the matrix only scales the vector without changing its direction. Eigenvalues are found by solving the characteristic equation det(A − λI) = 0, and they encode fundamental properties of the linear transformation including stability, principal stresses, and oscillation frequencies. Applications span quantum mechanics (energy levels), structural engineering (natural frequencies), principal component analysis (data variance), and PageRank (web link importance).

From Latin "matrix" (womb/source) and Latin "multiplicatio" (a multiplying, from "multiplicare" — to multiply). Matrix multiplication as a distinct operation was introduced by Arthur Cayley in his 1858 "Memoir on the Theory of Matrices".

linear-algebramatrixmultiplicationcompositiondot-product