# Matrix Addition and Subtraction

Matrices can be added together or subtracted from each other only if they have the same size, which means that they have to have the same number of rows and columns. This is because when adding or subtracting matrices, the operators work on corresponding entries of the matrices, hence the need for same size.

Matrix addition takes the following form as shown in these two matrices **A**
and **B** both of size 2 x 2

Each entry in matrices **A** and **B** is added to its corresponding counterpart
in the other matrix.

Using the matrix ** i,j** notation mentioned before, the above can be generalized
as follows

The same goes for matrix subtraction:

Addition of Matrices is commutative, meaning that given two matrices **A** and
**B**:

The best way to get used to matrix addition and subtraction is try as many examples as you can and eventually it becomes second nature. Here are a few worked examples, starting with some easy ones.

## Matrix Addition and Subtraction Examples

Example 1: Given matrices **A** and **B**, find their sum

*solution:*

Example 2: Find **C** + **A**, given that

*solution:*

which is not mathematically possible since the matrices are not the same size; **A**
is a 2 x 3 matrix while **C** is a 3 x 2 matrix, therefore they can't be added
or subtracted.

Example 3: Solve for *x,y,z* given that matrix **A** = matrix **B**

**Step 1**

We have already seen that if **A** = **B**, then the corresponding (*i,j*)
entries must be equal. Therefore, given the above, by equating corresponding entries,
you should see that

**Step 2**

From just inspecting the two matrices, we have already solved for **x**

**Step 3**

Similarly, we can choose which equation to use to find **y**

This is the same result you would obtain regardless of which equation you used to
solve for **y**

**Step 4**

**z** can be solved by picking any of the equations it appears in and substituting
**x** or **y** depending on which one is needed