Matrix Multiplication Calculator

Enter the values for Matrix A and Matrix B (up to 3×3) and the Matrix Multiplication Calculator computes their product matrix C = A × B. Set the number of rows and columns for each matrix, fill in the cell values, and get the resulting matrix with all computed entries displayed below.

Must equal Matrix A columns for multiplication to be valid.

Results

C[1][1]

--

C[1][2]

--

C[1][3]

--

C[2][1]

--

C[2][2]

--

C[2][3]

--

C[3][1]

--

C[3][2]

--

C[3][3]

--

Result Matrix Dimensions

--

Multiplication Valid

--

Result Matrix C — Cell Values

Results Table

Frequently Asked Questions

What is the main condition for multiplying two matrices?

For matrix multiplication A × B to be defined, the number of columns in Matrix A must equal the number of rows in Matrix B. If A is m×k and B is k×n, the result C will be an m×n matrix. If this condition is not met, the multiplication is undefined.

What size is the resulting matrix after multiplication?

The product matrix C = A × B has the same number of rows as Matrix A and the same number of columns as Matrix B. For example, multiplying a 2×3 matrix by a 3×2 matrix gives a 2×2 result matrix.

Is matrix multiplication commutative — does A × B equal B × A?

No, matrix multiplication is generally not commutative. In most cases A × B ≠ B × A. The dimensions may not even allow the reverse multiplication, and even when they do, the resulting values typically differ.

How is each entry of the product matrix calculated?

Each entry C[i][j] is calculated by taking the dot product of the i-th row of Matrix A and the j-th column of Matrix B. You multiply corresponding elements and sum the results: C[i][j] = Σ A[i][k] × B[k][j].

Can I multiply non-square matrices?

Yes, you can multiply non-square matrices as long as the number of columns in the first matrix equals the number of rows in the second. For example, a 2×3 matrix can be multiplied by a 3×1 matrix to produce a 2×1 matrix.

What is an identity matrix and what happens when you multiply by it?

An identity matrix is a square matrix with 1s on the main diagonal and 0s elsewhere. Multiplying any matrix by a compatible identity matrix returns the original matrix unchanged — it acts like multiplying by 1 in scalar arithmetic.

Can this calculator handle negative numbers and decimals?

Yes, all matrix cell inputs accept negative numbers and decimal values. Enter them directly into the cell fields — for example, -3.5 or 0.25 — and the calculator will compute the correct product.

What does it mean if the calculator shows multiplication is not valid?

If the number of columns in Matrix A does not equal the number of rows in Matrix B, multiplication is mathematically undefined. Adjust your matrix dimensions so that A columns = B rows before proceeding.

More Math Tools