Free Matrix Multiplication Calculator

Matrix A

[
]

Matrix B

[
]

Enter matrix values to see the product

Multiply Matrices with the Free Online Matrix Product Calculator

This matrix multiplication calculator is a free online tool that computes the product of two matrices (often denoted as AB). Handling sizes such as 2x2 matrix multiplication and 3x3 matrix multiplication, it quickly calculates every entry of the resulting matrix.

What Is Matrix Multiplication?

Unlike ordinary number multiplication, multiplying two matrices follows a specific rule based on the dot product of rows and columns. For matrices A (with rr rows and ss columns) and B (with ss rows and tt columns), the product C=AB\mathbf{C} = \mathbf{A}\mathbf{B} exists only if the number of columns of A equals the number of rows of B. The resulting matrix C then has dimensions r×tr \times t.

The entry in row ii and column jj of C is the sum of products of the corresponding elements from row ii of A and column jj of B:

cij=∑k=1saikbkjc_{ij} = \sum_{k=1}^{s} a_{ik} b_{kj}

Each cijc_{ij} is essentially the matrix dot product of the ii-th row of A and the jj-th column of B.

Key Rules and Properties

  • Dimension prerequisite: The inner dimensions must match — if A is m×nm \times n, B must be n×pn \times p.
  • Not commutative: In general AB≠BA\mathbf{A}\mathbf{B} \neq \mathbf{B}\mathbf{A}. Often one product is not even defined because the dimensions are incompatible.
  • Generalizes scalar multiplication: When both matrices are 1×11 \times 1, their product is just the product of the two numbers.
  • Determinant property: For square matrices, det⁡(AB)=det⁡(A)det⁡(B)\det(\mathbf{A}\mathbf{B}) = \det(\mathbf{A})\det(\mathbf{B}).

Step‑by‑Step Example: 3×2 Times 2×2

Let

A=(321654),B=(5271).\mathbf{A} = \begin{pmatrix} 3 & 2\\ 1 & 6\\ 5 & 4 \end{pmatrix},\qquad \mathbf{B} = \begin{pmatrix} 5 & 2\\ 7 & 1 \end{pmatrix}.

Since A has 3 rows and 2 columns and B has 2 rows and 2 columns, the product AB\mathbf{A}\mathbf{B} is a 3×23 \times 2 matrix. Each entry is computed as the dot product of a row from A and a column from B:

  • c11=(3)(5)+(2)(7)=15+14=29c_{11} = (3)(5) + (2)(7) = 15 + 14 = 29
  • c12=(3)(2)+(2)(1)=6+2=8c_{12} = (3)(2) + (2)(1) = 6 + 2 = 8
  • c21=(1)(5)+(6)(7)=5+42=47c_{21} = (1)(5) + (6)(7) = 5 + 42 = 47
  • c22=(1)(2)+(6)(1)=2+6=8c_{22} = (1)(2) + (6)(1) = 2 + 6 = 8
  • c31=(5)(5)+(4)(7)=25+28=53c_{31} = (5)(5) + (4)(7) = 25 + 28 = 53
  • c32=(5)(2)+(4)(1)=10+4=14c_{32} = (5)(2) + (4)(1) = 10 + 4 = 14

Thus

AB=(2984785314).\mathbf{A}\mathbf{B} = \begin{pmatrix} 29 & 8\\ 47 & 8\\ 53 & 14 \end{pmatrix}.

This same process is automated inside the matrix product calculator, saving time and avoiding manual errors.

How to Use the Matrix Multiplication Calculator

  1. Select the number of rows and columns for the first matrix (e.g., 3 rows, 2 columns).
  2. Do the same for the second matrix (e.g., 2 rows, 2 columns). The calculator will only allow dimension pairs that are compatible for multiplication.
  3. Enter the numerical values in the grid that appears.
  4. Click the “Calculate” button to instantly obtain the AB matrix product.

You can use this tool for 2x2 matrix multiplication, 3x3 matrix multiplication, or any other combination where the inner dimensions agree. The result is displayed clearly, and you can also see the intermediate dot‑product steps if needed.

Going Further: Matrix Decompositions

Just as numbers can be factored, matrices can be decomposed into products of simpler matrices. Common techniques include LU decomposition and Cholesky decomposition, which are valuable in solving linear systems and other advanced applications. While this calculator focuses on direct matrix multiplication, understanding these factorisations deepens your grasp of matrix theory.

Whether you’re studying linear algebra, working with 3D graphics, or solving systems of equations, the ability to multiply matrices quickly and accurately is essential. This online matrix product calculator gives you a reliable, free way to perform the operation for any compatible pair of matrices.

FAQ

1. What dimensions must two matrices have to be multiplied?

The number of columns of the first matrix must equal the number of rows of the second matrix. For example, a 3×2 matrix can only be multiplied by a 2×n matrix.

2. Is matrix multiplication commutative?

No, in general AB ≠ BA. Often one of the products is not even defined because the dimensions do not satisfy the required condition.

3. How does the matrix multiplication calculator handle incompatible matrices?

The calculator checks the dimensions you enter. If the inner dimensions don’t match (e.g., first matrix has 3 columns but second has 2 rows), it will not allow the multiplication to proceed.

4. Can the calculator multiply matrices larger than 3×3?

Yes, the tool can handle matrices of many sizes. You simply set the number of rows and columns for each matrix, as long as the multiplication condition is met.

5. What exactly is the matrix dot product?

In matrix multiplication, each entry c_{ij} is computed as the dot product of row i of the first matrix and column j of the second: multiply corresponding elements and sum the results.

How to Use

  1. Choose the number of rows and columns for Matrix A and Matrix B using the dropdowns.
  2. Enter the numeric values into the matrix cells. Only numbers and decimals are accepted.
  3. The product matrix A × B is computed instantly. Make sure A's columns equal B's rows.