gizmobench
BrowseDaily

Matrix Multiplication Calculator

Multiply two real matrices with independent row and column counts. This page opens on a 2×3 matrix times a 3×2 matrix, producing [58 64; 139 154] in exact arithmetic. Paste both complete grids or edit the cells; A’s column count must equal B’s row count. A column vector is an n×1 grid. The result has A’s rows and B’s columns, and a mismatch is explained with the two counts to change.

A2 × 3
RowsColumns
B3 × 2
RowsColumns
5864
139154
Display

Row by column. The columns of A have to match the rows of B, and B × A is usually a different matrix.

Paste a whole matrix

Use one row per line or semicolon. Separate entries with spaces, tabs or commas; write fractions as 1/3. Brackets around each row are optional. Applying a matrix replaces that grid and its dimensions.

  • DeterminantA is 2×3, and only a square matrix has a determinant
    not defined
  • Rank of Aall 2 rows independent; the most a 2×3 matrix can have
    2
  • A × Bexact fractions
    [ 58 64 ] [ 139 154 ]

Each entry is a row of A paired off against a column of B and summed. Matrix multiplication is not commutative, so B × A is usually a different matrix.

Every calculation uses exact rational numbers. Integers, decimals and fractions are read exactly. A singular square matrix has determinant 0 and no ordinary inverse. Fraction display keeps the exact value; Decimal rounds only the displayed result. Floating-point methods need care with rounding residuals near zero. This calculator accepts real numeric entries, not complex numbers or symbolic variables. It shows the finished answer rather than an intermediate row-operation trace.

Common questions

How do I multiply a 2×3 matrix by a 3×2 matrix?
Keep A at 2 rows and 3 columns and B at 3 rows and 2 columns. The shared inner size is 3, so the result is 2×2. With A = [1 2 3; 4 5 6] and B = [7 8; 9 10; 11 12], the first entry is 1×7 + 2×9 + 3×11 = 58, and the complete product is [58 64; 139 154]. The 2×3 times 3×2 example loads these exact values.
Can I multiply a matrix by a vector?
Yes. Enter a column vector in B with one column and as many rows as A has columns. [1 2 3; 4 5 6] times [1; 0; -1] gives [-2; -2]. A row vector belongs in a one-row grid, with the same inner-dimension rule. This is numeric matrix-vector multiplication; no symbolic or complex entries are accepted.
How can I paste spreadsheet cells or another result?
Open Paste a whole matrix. Use a new line or semicolon per row, with comma, tab or space separators between entries. Write fractions as 1/3. Text copies in bracketed rows can be pasted back directly. Apply to A and Apply to B validate the full grid before replacing its dimensions. A ragged or oversized grid is refused rather than truncated.
Can I multiply three or more matrices?
Multiply the first two, copy the exact Fraction result as text and apply it back to A. Apply the next matrix to B and multiply again, checking the new inner dimensions. This is a sequence of two-matrix products; there is no expression parser or simultaneous list of three matrices. Keep Fraction display when reusing a result, since Decimal copies reflect the chosen rounded display.
Is A × B the same as B × A?
Usually no. A = [1 2; 3 4] and B = [5 6; 7 8] give A × B = [19 22; 43 50], while B × A = [23 34; 31 46]. One order can even be undefined when dimensions differ. Change the grids deliberately to compute the other order; no hidden operand swap happens.
Does it show steps or preserve my saved matrices?
It shows the finished product, A’s determinant when square and the rank of A. The example above explains one row-column calculation, but the calculator does not print a full per-entry step trace. A visit or worked-example load alone does not replace a saved draft. Only fields you edit are saved. Text and LaTeX copies use the current display.

Exact: matrices are computed in rational arithmetic, so an inverse of an integer matrix is shown as fractions rather than rounded decimals, and a singular matrix is reported as singular instead of producing huge numbers.