Matrix Calculator

Add, multiply, or transpose real matrices from 1×1 through 8×8. The calculator checks dimensions, shows the key working step, and keeps every entry in your browser.

Choose an Operation and Enter Matrices

For A × B, B automatically has as many rows as A has columns.

Matrix A

2 × 3

Matrix B

3 × 2

Paste rows on separate lines; separate entries with spaces, commas, or tabs. Integers, decimals, and scientific notation are accepted.

Advertisement

Result: A × B

2 × 2
Enter valid matrices and select Calculate.
How the result is calculatedFor multiplication, each result entry is the dot product of one row of A and one column of B.

Matrix Operation Rules

Addition

Cᵢⱼ = Aᵢⱼ + Bᵢⱼ

A and B must have the same dimensions. The result has those same dimensions.

Multiplication

Cᵢⱼ = Σₖ AᵢₖBₖⱼ

For an m×n matrix A and n×p matrix B, the product AB is m×p.

Transpose

(Aᵀ)ᵢⱼ = Aⱼᵢ

Transposing swaps rows and columns, so an m×n matrix becomes n×m.

Number handling: Calculations use IEEE 754 double-precision arithmetic. Inputs must be finite and no greater than 10¹⁵⁰ in magnitude; a calculation is rejected if its result exceeds the browser’s finite numeric range.

How to Use the Matrix Calculator

  1. Select addition, multiplication, or transpose.
  2. Choose the rows and columns of A. For multiplication, choose the columns of B; its required row count is set automatically.
  3. Type values into the cells or paste a complete rectangular matrix.
  4. Select the calculation button, review the result and working step, then copy the summary or download a CSV file.

Matrix Examples

Adding 2×2 matrices

[[1,2],[3,4]] + [[5,6],[7,8]]

Add corresponding entries to get [[6,8],[10,12]].

Multiplying rectangular matrices

(2×3) × (3×2) → (2×2)

The shared inner dimension is 3. Each output entry combines three products.

Transposing a 2×3 matrix

[[1,2,3],[4,5,6]]ᵀ

The result is [[1,4],[2,5],[3,6]], a 3×2 matrix.

Matrix Calculator FAQs

When can two matrices be added?

Only when both matrices have the same number of rows and the same number of columns. Addition pairs entries at identical positions.

When is matrix multiplication possible?

The number of columns in the first matrix must equal the number of rows in the second. These are the inner dimensions in (m×n)(n×p).

Why is AB usually different from BA?

Matrix multiplication depends on ordered row-by-column dot products. Reversing the order changes those pairings and may also make the dimensions incompatible.

Can I use negative numbers, decimals, and scientific notation?

Yes. For example, -2.5 and 1e-6 are valid finite entries.

What happens when a matrix is transposed twice?

You get the original matrix: (Aᵀ)ᵀ = A.

Are my matrix values private?

Yes. Parsing, calculation, clipboard text, and CSV creation happen locally in your browser. This calculator’s code does not transmit or save matrix entries.

Calculation Notes and Limits

Last reviewed: August 4, 2026 by the Starlight Tools editorial team.

Matrices are limited to 8×8 for readable interaction and predictable browser performance. Decimal results may contain small floating-point rounding differences. This educational calculator is suitable for routine checking and learning, but safety-critical engineering or scientific work should use validated numerical software and appropriate precision analysis.

Explore more tools