Matrix Multiplication Calculator
Multiply two matrices with automatic dimension validation. Enter your matrices below and get instant results with step-by-step solutions.
Matrix A
Matrix B
Result
How to Multiply Matrices
Dimension Rule
Matrix A (m×n) can multiply Matrix B (p×q) only if n = p. Result is m×q.
Dot Product
Each element is the dot product of corresponding row and column vectors.
Non-Commutative
Matrix multiplication is NOT commutative: A×B ≠ B×A (in general)
Associative Property
Matrix multiplication is associative: (A×B)×C = A×(B×C)
Mathematical Theory & History
What is Matrix Multiplication?
Matrix multiplication is a binary operation that produces a matrix from two matrices. Unlike element-wise operations, matrix multiplication follows specific rules based on linear combinations of rows and columns.
Formula: (A × B)ij = Σk Aik × Bkj
Where the sum is over all valid k values, and matrices must have compatible dimensions.
Historical Background
Matrix multiplication was formalized by Arthur Cayley in 1858, building upon earlier work by Carl Friedrich Gauss on linear transformations and systems of equations.
Cayley's insight was that matrix multiplication represents the composition of linear transformations, making it a fundamental operation in linear algebra. This concept revolutionized mathematics, physics, and later computer science, enabling efficient representation of complex transformations.
Properties of Matrix Multiplication
Associative Property
(A × B) × C = A × (B × C)
Distributive Property
A × (B + C) = A × B + A × C
Identity Element
A × I = I × A = A (where I is identity matrix)
Non-Commutative
A × B ≠ B × A (in general)
Real-World Applications
Computer Graphics
3D transformations, rotations, scaling, and perspective projections
Machine Learning
Neural network computations, feature transformations, and deep learning
Physics & Engineering
Quantum mechanics, structural analysis, and signal processing
Economics & Finance
Portfolio optimization, risk modeling, and economic system analysis
Frequently Asked Questions
You can multiply matrix A by matrix B only when the number of columns in A equals the number of rows in B. For example, a 3×4 matrix can multiply a 4×2 matrix, resulting in a 3×2 matrix.
No, matrix multiplication is generally NOT commutative. A×B is usually different from B×A. In fact, if A×B is possible, B×A might not even be defined due to dimension incompatibility.
Each element (i,j) in the result matrix is calculated by taking the dot product of row i from the first matrix and column j from the second matrix. Multiply corresponding elements and sum them up.
Multiplying any matrix by an appropriately sized identity matrix (I) leaves the original matrix unchanged: A×I = I×A = A. The identity matrix acts like the number 1 in regular multiplication.
No, there are strict dimension requirements. For A×B to be valid, the number of columns in A must equal the number of rows in B. The result will have the same number of rows as A and the same number of columns as B.
Matrix multiplication follows specific rules involving dot products of rows and columns, while element-wise multiplication (Hadamard product) simply multiplies corresponding elements. They are completely different operations with different applications.
Matrix multiplication represents the composition of linear transformations, making it essential for computer graphics, machine learning, physics simulations, and solving systems of linear equations. It's the mathematical foundation for many modern technologies.