Matrix Addition Subtraction Calculator

Matrix Addition and Subtraction Calculator

Add or subtract two matrices element by element when both matrices share the same dimensions.

Last updated: June 2026 | By Patchworkr Team

Matrix Operation Solver
Matrix A
+
Matrix B
Result
6
8
10
12

What Are Matrix Addition and Subtraction?

Matrix addition and subtraction are element-wise operations. They only work when both matrices have the same dimensions, so each entry lines up with a matching entry in the other matrix.

How to Add or Subtract Matrices

  1. Confirm both matrices have the same size.
  2. Choose addition or subtraction.
  3. Add or subtract corresponding entries.
  4. Read the resulting matrix in the result panel.
C[i][j] = A[i][j] ± B[i][j]

Worked Example

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

element-wise addition

Frequently Asked Questions

What if the matrices have different dimensions?

The calculator rejects mismatched dimensions because element-wise operations require one-to-one alignment.

Can I enter decimals?

Yes. Any finite real matrix entries are accepted, including decimals and scientific notation.

Does subtraction change the matrix size?

No. The result has the same dimensions as the input matrices.

What if a cell is blank?

Blank cells are rejected instead of being silently converted to zero.

Related Tools