Adding and Subtracting Matrices

Adding and Subtracting Matrices

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

Example 1

If A = [1 2 / 3 4] and B = [2 -1 / 0 1], find A + B.

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

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

Add the elements in the same position.

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

Row 2, Column 1: 3 + 0
Row 2, Column 2: 4 + 1

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

3 + 0 = 3
4 + 1 = 5

So [3 1 / 3 5] is the answer.

Example 2

If A = [1 2 / 3 4] and B = [2 -1 / 0 1], find A - B.

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

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

Subtract the elements in the same position.

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

Row 2, Column 1: 3 - 0
Row 2, Column 2: 4 - 1

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

3 - 0 = 3
4 - 1 = 3

So [-1 3 / 3 3] is the answer.

Example 3

If A = [1 2 / 3 4] and B = [2 -1 / 0 1], find 2A - 5B.

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

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

Multiply 2 to the elements of [1 2 / 3 4].
Then [2⋅1 2⋅2 / 2⋅3 2⋅4].

Multiply 5 to the elements of [2 -1 / 0 1].
Then [5⋅2 5⋅(-1) / 5⋅0 5⋅1].

[2⋅1 2⋅2 / 2⋅3 2⋅4] = [2 4 / 6 8]

[5⋅2 5⋅(-1) / 5⋅0 5⋅1] = [10 -5 / 0 5]

Subtract the elements in the same position.

Row 1, Column 1: 2 - 10
Row 1, Column 2: 4 - (-5)

Row 2, Column 1: 6 - 0
Row 2, Column 2: 8 - 5

2 - 10 = -8
4 - (-5) = 9

6 - 0 = 6
8 - 5 = 3

So [-8 9 / 6 3] is the answer.