Add and Subtract Matrices

How to add and subtract matrices: 4 examples and their solutions.

Example 1

Example

Solution

A = [1 2 / 3 4]
B = [2 -1 / 0 1]

So A + B = [1 2 / 3 4] + [2 -1 / 0 1].

Add the same position elements.

Row 1, Column 1:
1 + 2

Row 1, Column 2:
2 + (-1)

Row 2, Column 1:
3 + 0

Row 2, Column 2:
4 + 1

So [1 2 / 3 4] + [2 -1 / 0 1]
= [1 + 2 2 + (-1) / 3 + 0 4 + 1].

1 + 2 = 3

2 + (-1) = 2 - 1 = 1

3 + 0 = 3

4 + 1 = 5

So A + B = [3 1 / 3 5].

Example 2

Example

Solution

A = [1 2 / 3 4]
B = [2 -1 / 0 1]

So A - B = [1 2 / 3 4] - [2 -1 / 0 1].

Subtract the same position elements.

Row 1, Column 1:
1 - 2

Row 1, Column 2:
2 - (-1)

Row 2, Column 1:
3 - 0

Row 2, Column 2:
4 - 1

So [1 2 / 3 4] - [2 -1 / 0 1]
= [1 - 2 2 - (-1) / 3 - 0 4 - 1].

1 - 2 = -1

2 - (-1) = 2 + 1 = 3

3 - 0 = 3

4 - 1 = 3

So A - B = [-1 3 / 3 3].

Example 3

Example

7A is neither adding nor subtracting matrices.
But, to solve the next example,
let's see how to solve 7A.

Solution

A = [1 2 / 3 4]

So 7A = 7[1 2 / 3 4].

Multiply 7 to each element.

7⋅1 = 7

7⋅2 = 14

7⋅3 = 21

7⋅4 = 28

So 7A = [7 14 / 21 28].

Example 4

Example

Solution

A = [1 2 / 3 4]
B = [2 -1 / 0 1]

So 2A - 5B = 2[1 2 / 3 4] - 5[2 -1 / 0 1].

For the same position elements,
write
2⋅[element in A] - 5⋅[element in B].

Row 1, Column 1:
2⋅1 - 5⋅2

Row 1, Column 2:
2⋅2 - 5⋅(-1)

Row 2, Column 1:
2⋅3 - 5⋅0

Row 2, Column 2:
2⋅4 - 5⋅1

This is the way to solve 2A - 5B.

2⋅1 - 5⋅2
= 2 - 10

2⋅2 - 5⋅(-1)
= 4 + 5⋅1
= 4 + 5

2⋅3 - 5⋅0
= 6 - 0

2⋅4 - 5⋅1
= 8 - 5

2 - 10 = -8

4 + 5 = 9

6 - 0 = 6

8 - 5 = 3

So 2A - 5B = [-8 9 / 6 3].