Matrix Addition and Subtraction Calculator

Add or subtract two matrices of the same size, entry by entry.

Operation

Choose add or subtract.

Matrix A
Rows
2
Columns
2

Write rows separated by semicolons, like 1, 2; 3, 4.

Matrix B
Rows
2
Columns
2

Write rows separated by semicolons, like 5, 6; 7, 8.

Try

Result

You entered(1234)+(5678)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} + \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}

(681012)\displaystyle \begin{pmatrix} 6 & 8 \\ 10 & 12 \end{pmatrix}
Show the work
  1. Matrices of the same size

    Here AA and BB are both 2×22 \times 2 matrices. Matrices can be added only when they have the same size, because the entries are paired by position.

  2. Matrix addition

    Add the entries of BB to the entries of AA in the same position. For the entry in row 1, column 1, a11=1a_{11} = 1 and b11=5b_{11} = 5.

    Using (A+B)ij=aij+bij\left(A + B\right)_{ij} = a_{ij} + b_{ij}

    (A+B)11=1+5=6\begin{aligned} \left(A + B\right)_{11} &= 1 + 5 \\ &= 6 \end{aligned}
  3. Every entry

    Do the same for every position.

    A+B=(1234)+(5678)=(681012)A + B = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} + \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} = \begin{pmatrix} 6 & 8 \\ 10 & 12 \end{pmatrix}
  4. Result

    So A+B=(681012)A + B = \begin{pmatrix} 6 & 8 \\ 10 & 12 \end{pmatrix}.

Worked examples