Skip to main content
Pearson+ LogoPearson+ Logo
All Calculators & ConvertersAll calculators

Enter matrices

You can type decimals or fractions like -3/4. Separate rows by new lines or semicolons. Separate entries by spaces or commas.

Formats accepted: 1 2; 3 4 or line breaks, or commas.

Only needed for A ± B and A·B.

Options:

Chips prefill matrices and run the calculation.

Result:

No results yet. Enter values and click Calculate.

How to use this calculator

  1. Choose an operation (A+B, A·B, det(A), etc.).
  2. Paste or type Matrix A (and Matrix B / vector b if needed).
  3. Turn on Prefer exact fractions to keep results exact.
  4. Click Calculate to get the result + optional steps and mini visual.

How this calculator works

  • Addition/Subtraction: element-by-element (same dimensions).
  • Multiplication: row-by-column dot products.
  • RREF/Solve/Inverse: Gaussian elimination with exact fractions.
  • Determinant: elimination-based pivot tracking (exact).

Formula & Equation Used

Addition/Subtraction (same size matrices): C[i,j] = A[i,j] ± B[i,j]

Multiplication (A is m×n, B is n×p): C[i,j] = Σk=1..n A[i,k] · B[k,j]

Solving A·x = b: build the augmented matrix [A | b], then use row operations to reach RREF and read x.

Inverse: build [A | I], row-reduce until the left side is I. The right side becomes A−1.

Example Problems & Step-by-Step Solutions

Example 1: Add two 2×2 matrices

Let A = [ [1, 2], [3, 4] ] and B = [ [5, 6], [7, 8] ]. Compute A + B.

  1. Add entry-by-entry: C[1,1] = 1+5 = 6, C[1,2] = 2+6 = 8.
  2. Second row: C[2,1] = 3+7 = 10, C[2,2] = 4+8 = 12.
  3. Result: A+B = [ [6, 8], [10, 12] ].

Example 2: Multiply a 2×3 matrix by a 3×2 matrix

Let A = [ [1,2,3], [4,5,6] ] and B = [ [7,8], [9,10], [11,12] ]. Compute A·B.

  1. C[1,1] = 1·7 + 2·9 + 3·11 = 58
  2. C[1,2] = 1·8 + 2·10 + 3·12 = 64
  3. C[2,1] = 4·7 + 5·9 + 6·11 = 139
  4. C[2,2] = 4·8 + 5·10 + 6·12 = 154
  5. Result: A·B = [ [58,64], [139,154] ].

Example 3: Solve A·x = b (2×2)

Let A = [ [2,1], [5,3] ], b = [ [1], [0] ]. Solve for x.

  1. Write the augmented matrix [A | b] = [ [2,1 | 1], [5,3 | 0] ].
  2. Eliminate the first column in row 2 (one valid move): R2 = R2 − (5/2)·R1.
  3. Row-reduce to RREF; the last column becomes the solution vector x.
  4. This calculator performs those row operations exactly (fractions), then prints x.

Tip: If you want to see the exact row operations, keep Show step-by-step enabled.

Frequently Asked Questions

Q: What formats can I paste?

Spaces or commas for entries; new lines or semicolons for rows. Fractions like 3/5 work too.

Q: Why does A·B sometimes error?

The number of columns in A must equal the number of rows in B.

Q: When does an inverse exist?

Only for square matrices with det(A) ≠ 0.

Q: What is RREF used for?

RREF (row-reduced echelon form) is used to solve linear systems, find matrix rank, and determine whether a system has a unique, infinite, or no solution.