Matrix Multiplication Calculator

Build any valid product from two matrices quickly. Auto-generates grids and checks dimensions for you. See the result above, then download and share today.

Calculator

Choose matrix sizes. Compatibility is enforced by setting rows(B) = cols(A). Max size: 6×6.

Derived size
Rows of B (rB): 2
Matrix A
Size:
Matrix B
Size:
Example Data Table

This example multiplies a 2×3 matrix by a 3×2 matrix to produce a 2×2 result.

A (2×3)
123
456
B (3×2)
78
910
1112
C = A×B (2×2)
5864
139154
Quick check: element c1,1 = (1×7) + (2×9) + (3×11) = 58.
Formula Used

If A is r×m and B is m×c, the product C = A×B is an r×c matrix.

Entry-wise definition
ci,j = ∑k=1m ai,k · bk,j

This calculator applies the dot-product rule for each output cell.

How to Use This Calculator
  1. Select rows and columns for Matrix A.
  2. Pick columns for Matrix B; rows of B update automatically.
  3. Enter values in both grids (blank cells count as 0).
  4. Press Multiply Matrices to compute C = A×B.
  5. Use Download CSV or Download PDF after calculation.

Dimension Compatibility and Output Size

Matrix multiplication is defined only when the number of columns in A equals the number of rows in B. If A is r×m and B is m×c, the product C is r×c. This calculator locks rows(B) to cols(A) so every selection stays valid and the result size is predictable.

Rectangular matrices are supported, enabling transformations, system modelling, and data aggregation. For example, a 2×3 by 3×2 product compresses three features into two outputs. If B is an identity matrix of matching size, the product returns A unchanged, which is a quick sanity test.

Cell Computation and Numeric Behavior

Each output cell c(i,j) is a dot product between row i of A and column j of B: sum over k of a(i,k)·b(k,j). The form accepts decimals and negatives, and blank inputs are treated as zero to keep data entry fast while preserving correct algebraic behavior.

Performance Notes for Larger Grids

For an r×m times m×c product, the computation performs r·m·c multiplications and nearly as many additions. With the built‑in 6×6 limit, the largest workload is 6·6·6 = 216 dot‑product steps, which runs instantly in typical browsers and hosting environments.

The interface regenerates input grids when sizes change, preserving existing values where names still match. This prevents accidental data loss while you explore different shapes. If you exceed typical ranges, random fill helps test patterns, symmetry, and sign behaviour quickly.

Quality Checks and Interpretation Tips

To interpret results, verify units and ordering: matrix multiplication is not commutative, so A×B generally differs from B×A. If a row in A or a column in B contains many zeros, the corresponding computations simplify and you can spot‑check by recalculating one cell manually.

Exports and Record Keeping

After calculating, you can export the result matrix for reports or homework checks. CSV downloads open cleanly in spreadsheets, while the PDF provides a printable snapshot with the sizes and a formatted grid. Recalculate anytime; the latest result is saved for immediate exporting.

For classroom work, log intermediate inputs alongside the exported result. For engineering use, annotate matrices with variable names and units, then repeat calculations to compare scenarios and alternatives over time.

FAQs

1) What sizes can I multiply here?

You can multiply any A with 1–6 rows and 1–6 columns, and any B whose rows match A’s columns. The result will have A’s rows and B’s columns.

2) Why are blank cells treated as zero?

Blank inputs are interpreted as 0 so you can leave unused entries empty without errors. This matches common calculator behavior and keeps data entry quick, especially for sparse matrices.

3) Does A×B equal B×A?

Usually not. Matrix multiplication is order‑sensitive, so swapping matrices changes the operation and the output size may even become invalid. Always confirm you are multiplying in the intended direction.

4) How are decimals handled?

Entries are computed with floating‑point arithmetic. The display trims trailing zeros, but the underlying sums include full precision. If precision matters, enter more decimal places and verify by exporting.

5) How do I verify one result cell?

Pick row i of A and column j of B, multiply matching positions, and add them. That dot product equals c(i,j). Spot‑checking one or two cells is a reliable correctness test.

6) What’s included in the CSV and PDF exports?

Both exports contain the latest result matrix C. CSV is ideal for spreadsheets, while the PDF adds a printable layout plus the matrix sizes. Compute again anytime to regenerate fresh exports.

Related Calculators

Row Reduction RREF CalculatorDiagonalization Checker CalculatorLU Decomposition Steps CalculatorQR Decomposition Steps Calculatormatrix calculator with variablesGauss-Jordan inverse calculatorPolynomial linear independence calculatorLinear independence of matrix calculatorComplex matrix inverse calculatorQR decomposition least squares

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.