• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Basic Mathematics
  • ⌕
Adding and Subtracting Matrices: Rules and Worked Examples

Adding and Subtracting Matrices: Rules and Worked Examples

Written by Jean Carlos Novaes

A matrix sum or difference combines entries in matching positions. You can perform these operations only when both matrices have the same number of rows and the same number of columns. The result keeps those dimensions.

Which matrices can you add?

A matrix with two rows and three columns has dimensions 2 × 3. It can be added to another 2 × 3 matrix, but not to a 3 × 2 matrix. Having six entries in each is not enough: their arrangement matters. Square matrices are not a requirement; rectangular matrices work in exactly the same way.

The entry in row i and column j is identified by those two indices. Each entry of the answer comes from the two entries at that position:

cij=aij±bij

How to add corresponding entries

Consider the matrices below. Add the top-left entries first, then move across the first row and continue with the second row. Do not add a row to a column or combine all entries into one number.

A+B=[2-134]+[52-31]A+B=[7105]

The top-right entry is −1 + 2 = 1, while the bottom-left entry is 3 + (−3) = 0. Keeping the brackets and rows aligned makes the correspondence visible.

Subtracting a matrix with negative entries

Use the same positions, but subtract each entry of B from its counterpart in A. A minus sign before a matrix applies to every entry, including negative ones.

Subtracting all four entries of the 2 × 2 matrices

Use A and B from the addition above to find A − B. Their dimensions match, so each subtraction keeps the same row and column.

  1. Calculate the first row. The top-left entries are 2 and 5; the top-right entries are −1 and 2.

    c11=2−5=−3
    c12=−1−2=−3
  2. Calculate the second row. Subtracting −3 means adding 3; the last position is an ordinary subtraction of positive numbers.

    c21=3−(−3)=6
    c22=4−1=3
  3. Place the four answers back in their original positions. The result remains a 2 × 2 matrix.

    A−B=[-3-363]

As a check, add the bottom-left entry of B, −3, to the difference entry 6. You recover 3, the corresponding entry of A.

In the bottom-left position, 3 − (−3) = 6. Subtracting a negative number adds its opposite. In the top-right position, −1 − 2 = −3. These two positions are useful checks because they involve different sign rules.

Why the order matters in subtraction

Addition is commutative: changing the order of the two matrices leaves the sum unchanged. Subtraction generally is not. In this example, reversing A and B changes every sign in the difference.

A+B=B+A;A+O=A

Here O is the zero matrix of the required dimensions. Adding it changes no entries. Also, subtracting a matrix from itself gives that zero matrix. For three matrices of the same dimensions, addition is associative, so regrouping the additions does not affect the answer.

Checking a matrix calculation

Count the rows and columns before calculating, check one position at a time, and confirm that the answer has the original dimensions. You can also add B back to A − B: the result must be A. If the matrices represent data, matching positions must refer to matching categories and use compatible units. A correct-looking array is not meaningful if one table lists months across columns and the other lists products.

References

  • OpenStax. College Algebra 2e: Matrices and Matrix Operations.
Jean Carlos Novaes

About Jean Carlos Novaes

I hold a degree in Computer Science from the Federal University of Bahia (2017) and I am the editor and founder of this website.

Footer

Basic Mathematics

Basic Mathematics website with clear school content for elementary and high school students. Learn easily and efficiently!

ABOUT

  • About Us
  • Contact
  • Site Map

LEGAL

  • How to Cite
  • Cookie Policy
  • Privacy Policy
  • Content License
English
  • Portuguese (Português)
  • Danish (Dansk)
  • German (Deutsch)
  • English
  • Spanish (Español)
  • Finnish (Suomi)
  • French (Français)
  • Italian (Italiano)
  • Dutch (Nederlands)
  • Norwegian (Norsk)
  • Polish (Polski)
  • Portuguese (Portugal)
  • Swedish (Svenska)

© 2015–2026 · Basic Mathematics · All rights reserved.