Matrix Multiplication Calculator
Fast, accurate and free online mnozenia macierzy calculator tool running directly in your browser.
-
1Enter data
Enter content, paste text or load a file from disk. -
2Click the button
The tool will immediately process your data in the browser. -
3Get the result
Copy the finished text or save the file to your device.
return "Result ready in 0.1s";
}
Rate this tool:
Related tools
Other tools you may find usefulMatrix Multiplication Calculator - Calculate A×B Step by Step
Matrix Multiplication Calculatorcalculates the product of two A×B matrices and shows the result with intermediate steps. The perfect tool for checking your calculations, learning linear algebra and understanding matrix multiplication.
What is matrix multiplication?
Matrix multiplication is an operation in linear algebra in which two matrices form a third. For A×B, matrix A must have a number of columns equal to the number of rows in matrix B. If A is of size m×n and B is of size n×p, the resulting matrix C = A×B is of size m×p. We calculate the element C[i][j] as the scalar product of the i-th row of A and the j-th column of B: C[i][j] = Σ(k=1 to n) A[i][k] × B[k][j].
How to use the calculator?
Enter the dimensions of matrix A (rows × columns) and matrix B (rows × columns). Remember: the number of columns in A must equal the number of rows in B. Fill in the elements of both matrices - you can use whole numbers, decimals or fractions. By clicking "Calculate", you receive the resulting matrix C = A×B along with an optional demonstration of each step of calculating individual elements.
Applications of Matrix Multiplication
Geometric Transformations- Rotating, scaling, and reflecting objects in 2D/3D computer graphics is accomplished by multiplying vectors by transformation matrices. Each frame of 3D animation contains millions of matrix multiplications.Neural networks and machine learning- propagation through the layers of a neural network is a series of matrix multiplications (weights × activations). Modern GPU cards are optimized for these operations (GEMM - General Matrix Multiply).Solving systems of equations- a system of linear equations Ax = b is solved by calculating the inverse of matrix A.Cryptography- some ciphers (Hill cipher) are based on matrix multiplication modulo n.
Properties of matrix multiplication
Multiplication matrix: is NOT commutative - A×B ≠ B×A (in general), is joint - (A×B)×C = A×(B×C), is separable with respect to addition - A×(B+C) = A×B + A×C, has a neutral element - identity matrix I (A×I = I×A = A), a square matrix can have an inverse A⁻¹ (if det(A) ≠ 0).
FAQ
Why can 2×3 and 3×4 matrices be multiplied, but 2×3 and 2×4 not?
Multiplication A×B is only possible when the number of columns of A = the number of rows of B. For A(2×3) and B(3×4): 3=3 ✓, the result is C(2×4). For A(2×3) and B(2×4): 3≠2 ✗, multiplication is impossible. This results from the definition of a dot product - we "connect" rows A with columns B, which requires compatibility of dimensions.
How to quickly verify matrix multiplication calculations?
Check: whether the dimensions match (columns A = rows B, result m×p), whether element [0][0] of the resulting matrix is correct (dot product of the 1st row of A and 1st column of B), whether the corner element [m-1][p-1] is correct. For small matrices, count several elements manually and compare with a calculator.
What is an identity matrix and what is its role?
The identity matrix I is a square matrix with 1 on the main diagonal and 0 everywhere else. It is a neutral element of matrix multiplication - A×I = I×A = A. Similarly to the number 1 for multiplying numbers. Identity matrix 2×2: [[1,0],[0,1]], 3×3: [[1,0,0],[0,1,0],[0,0,1]].
How to implement matrix multiplication in Python?
In numpy:import numpy as np; C = np.dot(A, B)orC = A @ B(the @ operator since Python 3.5). Manually:C = [[sum(A[i][k]*B[k][j] for k in range(len(B))) for j in range(len(B[0]))] for i in range(len(A))]. NumPy is millions of times faster than Python loops for large matrices thanks to BLAS/LAPACK.
What is the determinant of a matrix and how does it relate to multiplication?
The determinant (det) is a scalar value calculated for a square matrix. Important property: det(A×B) = det(A) × det(B). If det(A) = 0, the matrix is singular (irreversible) - there is no A⁻¹. The determinant geometrically represents the coefficient of change of volume/area during a linear transformation described by a matrix.