Matrix Multiplication
Multiply two matrices A and B (compatible dimensions) and show C = A·B.
Matriz A
Matriz B
Resultado A·B
Matrix multiplication: A(m×n) · B(n×p) = C(m×p)
Matrix multiplication is the core operation of linear algebra: each entry of the product is the dot product of a row of A with a column of B — C[i][j] = Σ A[i][k]·B[k][j]. The number of columns of A must equal the number of rows of B; the result has the rows of A and the columns of B. Example: A = [[1,2],[3,4]] and B = [[5,6],[7,8]] give C = [[19,22],[43,50]]. The product is not commutative: in general A·B ≠ B·A. Multiplying by the identity matrix I leaves a matrix unchanged: A·I = A. The naive algorithm is O(n³); Strassen brought it down to O(n^2.81) and Coppersmith–Winograd and its successors to around O(n^2.37) — Williams recently pushed this to roughly 2.371. In practice, BLAS libraries and GPU tensor cores (NVIDIA H100, Apple M3 Neural Engine) provide enormous speedups.
Applications
Composing linear transformations (a 3D graphics pipeline chains rotation × scale × translation as one matrix product), neural networks (every layer is essentially a matrix multiplication followed by a non-linearity), Markov chains (state_{t+1} = P · state_t), solving linear systems Ax = b via matrix inverses, computer vision (camera projection matrices), and statistics (covariance and least-squares regression).
FAQ
Why must the inner dimensions match? Because each output entry is a dot product of a row of A with a column of B — they must have the same number of elements, i.e. cols(A) = rows(B).
Is matrix multiplication associative? Yes: (A·B)·C = A·(B·C). It is also distributive over addition. It just isn't commutative.
When is A·B = B·A? Only in special cases, e.g. when both matrices are diagonal, when one is the identity or a scalar multiple of it, or when the matrices share an eigenbasis.
Related Tools
Determinant of 4×4 Matrix
Compute determinant of 4×4 matrix by Laplace expansion.
Matrix Determinant 2×2 / 3×3
Compute determinant of 2×2 and 3×3 matrices using Sarrus rule.
Eigenvalues 2×2 Matrix
Compute eigenvalues of 2×2 matrix solving λ² − (a+d)λ + (ad−bc) = 0.
Matrix 3x3 Determinant
Computes the determinant of a 3x3 matrix from its 9 inline elements.
Composite Modulus (Rule of Mixtures)
Calculate the longitudinal elastic modulus of a composite by the rule of mixtures, E_c = E_f·V_f + E_m·(1 − V_f), from the fiber modulus (E_f), the fiber volume fraction (V_f) and the matrix modulus (E_m). The result, in the modulus unit (GPa), is the modulus in the fiber direction (Voigt upper bound), assuming equal strain in fiber and matrix. It shows the composite stiffness is a volume-weighted average — stiff fibers (carbon, glass) at high fraction greatly raise the modulus. In the transverse direction, the inverse rule of mixtures (Reuss bound) applies, much lower. Enter the fiber modulus, the fiber fraction and the matrix modulus.
Fraction Calculator
Add, subtract, multiply and divide fractions. Simplifies to lowest terms and converts to decimal.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.