Choose matrix sizes. Compatibility is enforced by setting rows(B) = cols(A). Max size: 6×6.
This example multiplies a 2×3 matrix by a 3×2 matrix to produce a 2×2 result.
| A (2×3) | ||
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| B (3×2) | |
|---|---|
| 7 | 8 |
| 9 | 10 |
| 11 | 12 |
| C = A×B (2×2) | |
|---|---|
| 58 | 64 |
| 139 | 154 |
If A is r×m and B is m×c, the product C = A×B is an r×c matrix.
This calculator applies the dot-product rule for each output cell.
- Select rows and columns for Matrix A.
- Pick columns for Matrix B; rows of B update automatically.
- Enter values in both grids (blank cells count as 0).
- Press Multiply Matrices to compute C = A×B.
- 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
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.
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.
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.
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.
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.
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.