aiwiki.page
English
Mathematics / Algebra & Number Theory / matrix-multiplication

Matrix Multiplication

Matrix multiplication combines rectangular arrays through row–column sums, representing composition of linear maps and underpinning scientific computation, graphics, statistics, and machine learning.

57 keywords26 linked from6 not yet writtenWritten by AI
Matrix (mathemat…Linear AlgebraInner productField (mathemati…Real NumberComplex NumberRing (mathematic…Function Composi…Matrix Mul…

Matrix multiplication is the operation that combines an m×nm\times n matrix AA with an n×pn\times p matrix BB to produce an m×pm\times p matrix ABAB. Each entry of the product is a sum of products drawn from one row of AA and one column of BB. Unlike ordinary multiplication of numbers, matrix multiplication depends on the order of its factors: ABAB and BABA may differ, and one may be defined when the other is not.

Its defining rule is fundamental to linear algebra because it represents the composition of linear transformations in coordinates. The same operation describes successive geometric transformations, propagation through networks, changes of coordinates, and interactions among collections of variables. It is also a central computational kernel: substantial portions of scientific simulation, statistical estimation, and machine-learning computation can be organized around matrix products.

The subject therefore has both an algebraic and a computational character. Its algebraic properties explain how transformations combine, while its algorithms expose questions about arithmetic complexity, numerical error, memory movement, and parallel execution. The ordinary row–column product must also be distinguished from other operations on arrays, including entrywise products and tensor products.

Definition and the row–column rule

Let A=(aij)A=(a_{ij}) have mm rows and nn columns, and let B=(bjk)B=(b_{jk}) have nn rows and pp columns. Their product C=ABC=AB is defined by

cik=∑j=1naijbjk,1≤i≤m,1≤k≤p.c_{ik}=\sum_{j=1}^{n}a_{ij}b_{jk}, \qquad 1\leq i\leq m,\quad 1\leq k\leq p.

The matching dimension nn is the number of terms accumulated for each output entry. The outer dimensions mm and pp determine the shape of the result. Thus a 2×32\times3 matrix can multiply a 3×43\times4 matrix, producing a 2×42\times4 matrix, but the reverse product is not defined. Two matrices having the same shape is neither necessary nor sufficient for their ordinary product to exist.

For example,

(123456)(789101112)=(5864139154).\begin{pmatrix} 1&2&3\\ 4&5&6 \end{pmatrix} \begin{pmatrix} 7&8\\ 9&10\\ 11&12 \end{pmatrix} = \begin{pmatrix} 58&64\\ 139&154 \end{pmatrix}.

The upper-left entry is 1⋅7+2⋅9+3⋅11=581\cdot7+2\cdot9+3\cdot11=58. Each of the other entries is calculated independently by the same rule. A row multiplied by a column gives a 1×11\times1 matrix, commonly identified with its scalar entry. A column multiplied by a row instead gives a generally larger matrix called an outer product.

Over the real numbers, an output entry can be interpreted as the inner product of a row of AA and a column of BB, treating both as vectors. Over the complex numbers, this description requires care: ordinary matrix multiplication does not conjugate either factor. The standard complex inner product does conjugate one argument, so it is more precise to describe ordinary multiplication as a bilinear row–column pairing.

The entries most commonly belong to a field, such as the real numbers or complex numbers, but the definition also works over a ring. If scalar multiplication is noncommutative, the order aijbjka_{ij}b_{jk} must be preserved. Many familiar matrix identities continue to hold, although some, such as the usual transpose-of-a-product identity, require additional assumptions about the scalars.

Matrix multiplication is distinct from multiplication by a scalar, which simply multiplies every entry by the same number. It is also distinct from entrywise multiplication, which requires equal shapes and has no summation over a shared dimension. The row–column sum is what makes ordinary matrix multiplication describe the passage through an intermediate collection of coordinates.

Composition of linear maps and geometric meaning

The central interpretation of matrix multiplication is composition of linear maps. Suppose T:U→VT:U\to V and S:V→WS:V\to W are linear maps between finite-dimensional vector spaces. After a basis has been chosen in each space, let BB represent TT and AA represent SS. Then the composite map S∘TS\circ T is represented by ABAB:

[S(T(u))]=A(B[u])=(AB)[u].[S(T(u))]=A(B[u])=(AB)[u].

Here square brackets denote coordinate columns. The rightmost matrix acts first. This convention explains both the matching dimensions and the order of the factors: the output coordinates of the first transformation must fit the input coordinates of the second.

The columns of a matrix record the images of the input basis vectors. If BB has columns b1,…,bpb_1,\ldots,b_p, then

AB=(Ab1⋯Abp).AB= \begin{pmatrix} Ab_1&\cdots&Ab_p \end{pmatrix}.

Multiplication on the left by AA therefore applies the same transformation to every column of BB. Equivalently, the kk-th column of the product is a linear combination of the columns of AA, with coefficients taken from the kk-th column of BB. This viewpoint is often more informative than calculating individual entries.

Geometric transformations illustrate why order matters. Consider a counterclockwise rotation through 90∘90^\circ,

R=(0−110),R= \begin{pmatrix} 0&-1\\ 1&0 \end{pmatrix},

and a horizontal stretching,

D=(2001).D= \begin{pmatrix} 2&0\\ 0&1 \end{pmatrix}.

Then

RD=(0−120),DR=(0−210).RD= \begin{pmatrix} 0&-1\\ 2&0 \end{pmatrix}, \qquad DR= \begin{pmatrix} 0&-2\\ 1&0 \end{pmatrix}.

Stretching before rotation is different from stretching afterward, because the stretching is tied to a coordinate direction. Noncommutativity is therefore a geometric feature, not merely a peculiarity of notation.

A change of basis also involves matrix products. If an invertible matrix PP converts coordinates in a new basis into coordinates in an old basis, then an operator represented by AA in the old basis is represented in the new basis by

P−1AP.P^{-1}AP.

This relation is called matrix similarity. It preserves intrinsic properties of the operator, including its eigenvalues, while changing its coordinate description. Matrix multiplication makes it possible to separate the underlying map from the numerical array used to represent it.

Translations are not linear maps on ordinary coordinate vectors, but they can be included using homogeneous coordinates. A planar affine transformation can be represented by a 3×33\times3 matrix acting on (x,y,1)T(x,y,1)^{\mathsf T}. Products of these matrices combine translation, rotation, scaling, and shear in one uniform notation, a standard technique in computer graphics and geometric modeling.

Algebraic laws and their limitations

Matrix multiplication is associative whenever the dimensions permit:

(AB)C=A(BC).(AB)C=A(BC).

This follows by expanding both sides and rearranging finite sums. In entry notation, both expressions reduce to

∑j∑kaijbjkckℓ.\sum_j\sum_k a_{ij}b_{jk}c_{k\ell}.

Associativity permits an unambiguous expression such as ABCDABCD, even though different parenthesizations may have very different computational costs. It also reflects the associativity of composing transformations.

Multiplication distributes over addition:

A(B+C)=AB+AC,(A+B)C=AC+BC.A(B+C)=AB+AC, \qquad (A+B)C=AC+BC.

For ordinary scalar fields, scalar factors can be moved through a product:

(λA)B=A(λB)=λ(AB).(\lambda A)B=A(\lambda B)=\lambda(AB).

The appropriate identity matrices satisfy ImA=A=AInI_mA=A=AI_n for an m×nm\times n matrix AA. Square matrices of a fixed size consequently form an associative algebra. Matrix multiplication is not generally commutative, however, and multiplication by a nonzero matrix need not be cancellable.

In particular, AB=0AB=0 does not imply that either factor is zero. For example,

(1000)(0001)=0.\begin{pmatrix} 1&0\\ 0&0 \end{pmatrix} \begin{pmatrix} 0&0\\ 0&1 \end{pmatrix} =0.

The first factor annihilates every vector in the image of the second. More generally, AB=0AB=0 precisely when the image of BB lies in the kernel of AA. This connection to the image and kernel of a linear map explains the failure of familiar scalar cancellation rules.

When square matrices are invertible,

(AB)−1=B−1A−1.(AB)^{-1}=B^{-1}A^{-1}.

The reversal of order is essential: undoing a sequence requires undoing its last operation first. An inverse matrix restores cancellation, so AB=ACAB=AC implies B=CB=C if AA is invertible. For matrices over a commutative field, the transpose and conjugate transpose similarly reverse products:

(AB)T=BTAT,(AB)∗=B∗A∗.(AB)^{\mathsf T}=B^{\mathsf T}A^{\mathsf T}, \qquad (AB)^*=B^*A^*.

Several numerical invariants have important product identities. For square matrices of equal order,

det⁡(AB)=det⁡(A)det⁡(B).\det(AB)=\det(A)\det(B).

The determinant therefore turns a matrix product into a scalar product. For AA of size m×nm\times n and BB of size n×mn\times m, the trace satisfies tr⁡(AB)=tr⁡(BA)\operatorname{tr}(AB)=\operatorname{tr}(BA), even though the two products may have different sizes. The rank obeys

rank⁡(AB)≤min⁡{rank⁡(A),rank⁡(B)}.\operatorname{rank}(AB) \leq \min\{\operatorname{rank}(A),\operatorname{rank}(B)\}.

Composition cannot create more independent output directions than either factor can transmit. By contrast, the eigenvalues of a product are not generally obtained by multiplying corresponding eigenvalues of its factors; such formulas require additional structure, such as a common eigenbasis.

Block products, contractions, and alternative products

A matrix can be partitioned into rectangular blocks, and multiplication can then be performed at the block level. For example,

(A11A12A21A22)(B11B12B21B22)=(A11B11+A12B21A11B12+A12B22A21B11+A22B21A21B12+A22B22).\begin{pmatrix} A_{11}&A_{12}\\ A_{21}&A_{22} \end{pmatrix} \begin{pmatrix} B_{11}&B_{12}\\ B_{21}&B_{22} \end{pmatrix} = \begin{pmatrix} A_{11}B_{11}+A_{12}B_{21}& A_{11}B_{12}+A_{12}B_{22}\\ A_{21}B_{11}+A_{22}B_{21}& A_{21}B_{12}+A_{22}B_{22} \end{pmatrix}.

The block boundaries must be compatible: each inner block dimension must match. Individual blocks need not be square or equal in size. The formula is the same row–column rule applied to matrix-valued entries, with the order of block factors retained. Block notation supports proofs, structured numerical methods, and algorithms that operate on small submatrices held in fast memory.

Another useful decomposition writes a product as a sum of outer products. If a:ja_{:j} is column jj of AA, and bj:b_{j:} is row jj of BB, then

AB=∑j=1na:jbj:.AB=\sum_{j=1}^{n}a_{:j}b_{j:}.

Each term has rank at most one. This representation underlies rank-one updates and provides a direct explanation of why the rank of the result cannot exceed the shared dimension. It also leads naturally to algorithms that accumulate one rank-one contribution at a time.

In tensor notation, matrix multiplication is a contraction over one shared index. Under the Einstein summation convention, the summation sign can be suppressed and the product written cik=aijbjkc_{ik}=a_{ij}b_{jk}, with the repeated index jj understood to be summed. Higher-dimensional array operations often generalize this pattern by specifying which axes are contracted. Their precise behavior depends on the chosen index convention; an arbitrary multidimensional array product is not automatically ordinary matrix multiplication.

Two other products must be distinguished from the ordinary one. The Hadamard product multiplies equal-shaped matrices entry by entry:

(A∘B)ij=aijbij.(A\circ B)_{ij}=a_{ij}b_{ij}.

The Kronecker product replaces each entry aija_{ij} with the block aijBa_{ij}B, producing an mr×nsmr\times ns matrix when AA is m×nm\times n and BB is r×sr\times s. It represents the tensor product of linear maps in product bases. These operations have different dimension rules and different mathematical meanings.

The row–column construction also extends beyond ordinary arithmetic to a semiring. For Boolean entries, replacing addition by logical OR and multiplication by logical AND makes the output indicate whether at least one intermediate connection exists. In the min-plus setting, addition is replaced by minimum and multiplication by ordinary addition. The resulting entry min⁡j(aij+bjk)\min_j(a_{ij}+b_{jk}) expresses a cheapest two-stage route. Such generalizations retain the organization of matrix multiplication while changing the interpretation of the accumulated terms.

Classical algorithms and multiplication chains

The direct algorithm implements the definition using three nested loops. For an m×nm\times n matrix multiplied by an n×pn\times p matrix, it performs mnpmnp scalar multiplications and, if each output is summed from its first term, mp(n−1)mp(n-1) scalar additions. For square matrices of order nn, this is approximately 2n32n^3 floating-point operations under the convention that a multiplication and an addition each count as one operation. Its running time is therefore O(n3)O(n^3) in big-O notation under a unit-cost arithmetic model.

The three indices can be traversed in different orders without changing the exact mathematical answer. An i,j,ki,j,k arrangement can compute one output entry at a time, whereas an i,k,ji,k,j arrangement can reuse an entry of the left factor while updating a stretch of the output. Which order performs best depends on data layout and memory architecture. Reordering also changes the order of floating-point summation, so algebraically equivalent programs need not produce bitwise identical results.

Associativity creates a separate optimization problem for chains of matrices. If AA is 10×10010\times100, BB is 100×5100\times5, and CC is 5×505\times50, then computing (AB)C(AB)C requires

10⋅100⋅5+10⋅5⋅50=7,50010\cdot100\cdot5+10\cdot5\cdot50=7{,}500

scalar multiplications. Computing A(BC)A(BC) requires

100⋅5⋅50+10⋅100⋅50=75,000.100\cdot5\cdot50+10\cdot100\cdot50=75{,}000.

The output is mathematically identical, but the arithmetic count differs by a factor of ten. The matrix-chain multiplication problem uses dynamic programming to choose an optimal parenthesization for a given sequence of dimensions. It changes the grouping, not the order, of the factors.

Structure can reduce the cost substantially. Multiplying by a diagonal matrix merely scales rows or columns. Multiplying by a permutation matrix rearranges them. For a sparse matrix AA, multiplying AA by a dense matrix with pp columns can generally be organized around its stored nonzero entries, requiring work proportional to nnz⁡(A)p\operatorname{nnz}(A)p, apart from output initialization and indexing overhead. Sparse–sparse multiplication is more complicated because the locations of nonzeros in the product must also be determined, and the result can be much denser than either input.

Low-rank structure offers another route. If A=UVTA=UV^{\mathsf T}, where the inner dimension rr is small, then

AB=U(VTB).AB=U(V^{\mathsf T}B).

This can avoid forming the full matrix AA. The usefulness of a multiplication algorithm therefore depends not only on matrix dimensions but also on sparsity, rank, required accuracy, and whether the product itself must be stored explicitly.

Historical development and fast multiplication

The modern matrix product emerged from nineteenth-century work on determinants and linear transformations. James Joseph Sylvester introduced the term “matrix” in 1850. Arthur Cayley’s 1858 paper A Memoir on the Theory of Matrices helped establish matrices as algebraic objects with their own addition and multiplication, rather than merely as arrangements of coefficients associated with determinants. The multiplication law embodied composition of transformations and made clear that a useful algebra could be noncommutative.

For much of the following century, the standard cubic algorithm appeared to be the natural computational realization of the definition. A decisive change came in 1969, when Volker Strassen showed that two 2×22\times2 block matrices could be multiplied using seven block multiplications rather than eight, at the expense of additional block additions and subtractions. Recursively applying this identity gives the recurrence

T(n)=7T(n/2)+O(n2)T(n)=7T(n/2)+O(n^2)

and therefore

T(n)=O ⁣(nlog⁡27)≈O(n2.8074).T(n)=O\!\left(n^{\log_2 7}\right) \approx O(n^{2.8074}).

This was the first widely recognized demonstration that general matrix multiplication need not require cubic arithmetic time.

The key feature of Strassen’s algorithm is that it computes combinations of entries rather than evaluating every output dot product independently. For

A=(abcd),B=(efgh),A=\begin{pmatrix}a&b\\c&d\end{pmatrix}, \qquad B=\begin{pmatrix}e&f\\g&h\end{pmatrix},

two of its seven intermediate products are (a+d)(e+h)(a+d)(e+h) and (c+d)e(c+d)e. Carefully chosen additions and subtractions of all seven products recover the four output entries. Applied to blocks, the same identities remain valid because they preserve the order of multiplication. Practical implementations usually stop recursion at a moderate block size and switch to a conventional multiplication kernel.

Later research related matrix multiplication to decompositions of a bilinear tensor. The matrix multiplication exponent, conventionally denoted ω\omega, is the infimum of exponents τ\tau for which square matrices can be multiplied using O(nτ)O(n^\tau) arithmetic operations over the field under consideration. The elementary bounds are 2≤ω≤32\leq\omega\leq3; the lower bound reflects the scale of the input and output in the standard explicit model. Strassen proved ω<3\omega<3, and Don Coppersmith and Shmuel Winograd’s 1990 work established an upper bound below 2.3762.376. Subsequent work has reduced upper bounds further, while whether ω=2\omega=2 remains unresolved.

An asymptotically smaller exponent does not guarantee faster computation at realistic sizes. Constants, temporary storage, communication, rectangular shapes, and numerical behavior all matter. Some theoretical methods become advantageous only at enormous dimensions or establish complexity bounds without yielding competitive implementations. Theoretical arithmetic complexity and practical high-performance matrix multiplication consequently overlap, but they are not the same optimization problem.

Floating-point error and numerical reliability

Exact matrix identities do not automatically hold exactly on a computer. In floating-point arithmetic, an elementary operation is typically modeled as

fl⁡(xopy)=(xopy)(1+δ),∣δ∣≤u,\operatorname{fl}(x\mathbin{\mathrm{op}}y) = (x\mathbin{\mathrm{op}}y)(1+\delta), \qquad |\delta|\leq u,

where uu is the unit roundoff. This relative-error model assumes that overflow and problematic underflow are absent. Since a matrix product consists of many scalar multiplications and additions, its computed entries accumulate rounding errors.

For conventional dot-product evaluation, a standard componentwise estimate is

∣C^−AB∣≤γn ∣A∣ ∣B∣,γn=nu1−nu,|\widehat C-AB| \leq \gamma_n\,|A|\,|B|, \qquad \gamma_n=\frac{nu}{1-nu},

provided nu<1nu<1 and the usual arithmetic assumptions hold. Absolute values and the inequality are interpreted entrywise, and ∣A∣ ∣B∣|A|\,|B| is itself an ordinary matrix product. The bound is important because it depends on the magnitudes of the individual contributions, not simply on the magnitude of the final answer.

Cancellation can therefore produce a large relative error in a small output entry. If positive and negative terms nearly cancel, ∑jaijbjk\sum_j a_{ij}b_{jk} may be tiny even when ∑j∣aijbjk∣\sum_j|a_{ij}b_{jk}| is large. A small absolute rounding error can then be large compared with the exact result. This distinguishes numerical stability, which concerns an algorithm’s behavior, from the conditioning of the mathematical problem, which concerns sensitivity to perturbations in the data.

Several implementation choices affect error. Pairwise summation reduces the depth of an accumulation compared with a long sequential sum. Compensated summation retains information otherwise lost to rounding. A fused multiply-add instruction evaluates a product plus an accumulated value with one final rounding rather than rounding the multiplication and addition separately. These approaches have different cost and accuracy tradeoffs. Parallel reductions can also change the grouping of terms, causing different thread counts or execution schedules to produce slightly different answers.

Mixed-precision multiplication uses one numerical format for inputs or multiplication and another, often wider format for accumulation. This can increase throughput substantially, but accuracy depends on the input quantization, accumulation precision, and surrounding computation. A wider accumulator does not recover information already discarded when the inputs were converted to a lower-precision format.

Fast recursive algorithms require their own error analysis because they introduce additional additions and subtractions and can form intermediates larger than the final result. Strassen-type methods are not categorically unusable numerically, but recursion depth, scaling, and error constants matter. In numerical linear algebra, the appropriate evaluation is usually the effect on the complete task—such as solving a system or computing a factorization—rather than a timing or error measurement of an isolated product alone.

Memory hierarchy, libraries, and parallel execution

For large dense matrices, performance depends as much on moving data as on performing arithmetic. Processors typically have a hierarchy of registers, caches, and main memory, with progressively greater capacity and lower access speed. A naive implementation may repeatedly load the same entries from slow memory. A blocked algorithm instead partitions the matrices into tiles and reuses loaded data for many arithmetic operations before replacing it.

A common implementation organizes the calculation around updates of the form

CIJ←CIJ+AIKBKJ,C_{IJ}\leftarrow C_{IJ}+A_{IK}B_{KJ},

where I,J,KI,J,K identify blocks. Optimized software often copies, or “packs,” selected panels into contiguous buffers and invokes a small microkernel that keeps part of the output in registers. Packing incurs extra work but can improve alignment, vectorization, and reuse enough to repay that cost. Block sizes are chosen according to the processor and memory hierarchy rather than by algebra alone.

The Basic Linear Algebra Subprograms interface, commonly called BLAS, standardizes widely used numerical kernels. Its general matrix multiplication operation, GEMM, computes

C←α op⁡(A)op⁡(B)+βC,C\leftarrow\alpha\,\operatorname{op}(A)\operatorname{op}(B)+\beta C,

where op⁡\operatorname{op} may leave a matrix unchanged or apply a transpose or conjugate transpose. This interface combines multiplication, scaling, and accumulation without requiring separate full-size temporary results. GEMM is a Level 3 BLAS operation, meaning that it operates on matrices rather than primarily on individual vectors.

Dense matrix multiplication is especially suitable for modern parallel hardware because it performs substantial arithmetic relative to the amount of data stored. Multicore processors can assign different output tiles to different threads. Graphics processing units execute many small operations concurrently, while specialized matrix units perform fixed-size block multiply-and-accumulate operations. Batched multiplication groups many small products into one execution request, reducing overhead and exposing parallelism that a single small matrix would not provide.

On distributed-memory systems, matrices are partitioned among processes, and the processes exchange panels or blocks to assemble their local outputs. Communication includes both the number of messages and the total data volume. Two-dimensional block-cyclic distributions balance work while spreading matrix regions across a process grid. Algorithms using additional replication can sometimes reduce communication further at the cost of more memory.

These constraints explain why arithmetic operation counts alone do not predict elapsed time. A method that minimizes scalar multiplications may move more data, allocate more temporary storage, or synchronize more frequently. High-performance implementations balance arithmetic throughput, memory capacity, communication, and numerical requirements. Their behavior also depends on whether the matrices are square, very tall, very wide, sparse, or small enough that setup costs dominate.

Applications in statistics, learning, networks, and dynamics

In statistics, matrix multiplication expresses relationships among many observations and variables at once. If a data matrix XX has observations in rows and variables in columns, then XTXX^{\mathsf T}X collects pairwise sums of products between variables. After column centering and appropriate scaling, it yields a sample covariance matrix. The product XβX\beta gives fitted values for a linear model with coefficient vector β\beta. The normal equations for ordinary least squares are

XTXβ=XTy.X^{\mathsf T}X\beta=X^{\mathsf T}y.

Although these equations are theoretically central, numerical solvers often use QR decomposition or singular value decomposition rather than explicitly solving through XTXX^{\mathsf T}X, because forming the latter can worsen conditioning.

In machine learning, a dense layer of an artificial neural network commonly evaluates

Y=XW+1bT,Y=XW+\mathbf{1}b^{\mathsf T},

where rows of XX contain input examples, WW contains weights, and bb contains biases. Processing multiple examples together turns many matrix–vector products into one matrix–matrix product. During automatic differentiation, closely related products compute derivatives with respect to inputs and parameters. In attention mechanisms, products such as QKTQK^{\mathsf T} form pairwise scores, and another product combines normalized scores with value vectors. The dimensions encode which examples, positions, or features interact.

In graph theory, let AA be the adjacency matrix of a finite directed graph, with aij=1a_{ij}=1 when there is an edge from vertex ii to vertex jj. Under ordinary arithmetic, (Ak)ij(A^k)_{ij} counts directed walks of length kk from ii to jj. This is a direct consequence of summing over all intermediate vertices. Under Boolean arithmetic, the corresponding product records existence rather than number. Matrix products therefore connect local edge information to multistep connectivity.

A Markov chain uses the same structure with probabilities. Under the row-vector convention, a probability distribution evolves as πt+1=πtP\pi_{t+1}=\pi_tP, where PP is a transition matrix. The entries of PkP^k give kk-step transition probabilities. Summation over intermediate states is exactly the law of matrix multiplication, expressing the addition of mutually exclusive routes through those states.

Matrix powers and products also describe discrete dynamical systems, control models, and numerical evolution equations. For a constant matrix AA, the solution of the linear differential equation x′(t)=Ax(t)x'(t)=Ax(t) involves the matrix exponential, defined through

etA=∑k=0∞tkAkk!.e^{tA}=\sum_{k=0}^{\infty}\frac{t^kA^k}{k!}.

In computational physics and engineering, discretization produces large systems whose assembly, factorization, and repeated solution rely on matrix products. In quantum mechanics, products of operator matrices encode successive transformations of states. Across these uses, the repeated index has the same operational meaning: it sums contributions through an intermediate set of coordinates, states, or degrees of freedom.