<< Chapter < Page Chapter >> Page >

Matrix Addition and Subtraction

If two matrices have the same size, they can be added or subtracted. The operations are performed on corresponding entries.

Given the matrices A size 12{A} {} , B size 12{B} {} , C size 12{C} {} and D size 12{D} {} , below

A = 1 2 4 2 3 1 5 0 3 size 12{A= left [ matrix { 1 {} # 2 {} # 4 {} ##2 {} # 3 {} # 1 {} ## 5 {} # 0 {} # 3{}} right ]} {} B = 2 1 3 2 4 2 3 6 1 size 12{B= left [ matrix { 2 {} # - 1 {} # 3 {} ##2 {} # 4 {} # 2 {} ## 3 {} # 6 {} # 1{}} right ]} {} C = 4 2 3 size 12{C= left [ matrix { 4 {} ##2 {} ## 3} right ]} {} D = 2 3 4 size 12{D= left [ matrix { - 2 {} ##- 3 {} ## 4} right ]} {}

Find, if possible.

  1. A + B size 12{A+B} {}
  2. C D size 12{C - D} {}
  3. A + D size 12{A+D} {} .

As we mentioned earlier, matrix addition and subtraction involves performing these operations entry by entry.

  1. We add each element of A size 12{A} {} to the corresponding entry of B size 12{B} {} .

    A + B = 3 1 7 4 7 3 8 6 4 size 12{A+B= left [ matrix { 3 {} # 1 {} # 7 {} ##4 {} # 7 {} # 3 {} ## 8 {} # 6 {} # 4{}} right ]} {}
  2. Just like the problem above, we perform the subtraction entry by entry.

    C D = 6 5 1 size 12{C - D= left [ matrix { 6 {} ##5 {} ## - 1} right ]} {}
  3. The sum A + D size 12{A+D} {} cannot be found because the two matrices have different sizes.

Got questions? Get instant answers now!
Got questions? Get instant answers now!
Two matrices can only be added or subtracted if they have the same dimension.

Multiplying a Matrix by a Scalar

If a matrix is multiplied by a scalar (a constant number), each entry is multiplied by that scalar.

Given the matrix A size 12{A} {} and C size 12{C} {} in [link] , find 2A size 12{2A} {} and 3C size 12{ - 3C} {} .

To find 2A size 12{2A} {} , we multiply each entry of matrix A size 12{A} {} by 2 size 12{2} {} , and to find 3C size 12{ - 3C} {} , we multiply each entry of C size 12{C} {} by 3 size 12{ - 3} {} . The results are given below.

  1. We multiply each entry of A size 12{A} {} by 2 size 12{2} {} .

    2A = 2 4 8 4 6 2 10 0 6 size 12{2A= left [ matrix { 2 {} # 4 {} # 8 {} ##4 {} # 6 {} # 2 {} ## "10" {} # 0 {} # 6{}} right ]} {}
  2. We multiply each entry of C size 12{C} {} by 3 size 12{ - 3} {} .

    3C = 12 6 9 size 12{ - 3C= left [ matrix { - "12" {} ##- 6 {} ## - 9} right ]} {}
Got questions? Get instant answers now!
Got questions? Get instant answers now!

Multiplication of Two Matrices

To multiply a matrix by another is not as easy as the addition, subtraction, or scalar multiplication of matrices. Because of its wide use in application problems, it is important that we learn it well. Therefore, we will try to learn the process in a step by step manner. We first begin by finding a product of a row matrix and a column matrix.

Given A = 2 3 4 size 12{A= left [ matrix { 2 {} # 3 {} # 4{}} right ]} {} and B = a b c size 12{B= left [ matrix { a {} ##b {} ## c} right ]} {} , find the product AB size 12{ ital "AB"} {} .

The product is a 1 × 1 size 12{1 times 1} {} matrix whose entry is obtained by multiplying the corresponding entries and then forming the sum.

AB = 2 3 4 a b c = 2a + 3b + 4c size 12{ ital "AB"= left [ matrix { 2 {} # 3 {} # 4{}} right ] left [ matrix {a {} ## b {} ##c } right ]= left [ left (2a+3b+4c right ) right ]} {}

Note that AB size 12{ ital "AB"} {} is a 1 × 1 size 12{1 times 1} {} matrix, and its only entry is 2a + 3b + 4c size 12{2a+3b+4c} {} .

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Given A = 2 3 4 size 12{A= left [ matrix { 2 {} # 3 {} # 4{}} right ]} {} and B = 5 6 7 size 12{B= left [ matrix { 5 {} ##6 {} ## 7} right ]} {} , find the product AB size 12{ ital "AB"} {} .

Again, we multiply the corresponding entries and add.

AB = 2 3 4 5 6 7 = 2 5 + 3 6 + 4 7 = 10 + 18 + 28 = 56 size 12{ matrix { ital "AB" {} # ={} {} # left [ matrix {2 {} # 3 {} # 4{} } right ]left [ matrix { 5 {} ##6 {} ## 7} right ] {} ##{} # ={} {} # left [2 cdot 5+3 cdot 6+4 cdot 7 right ] {} ##{} # ={} {} # left ["10"+"18"+"28" right ] {} ##{} # ={} {} # left ["56" right ]{}} } {}
Got questions? Get instant answers now!
Got questions? Get instant answers now!
In order for a product of a row matrix and a column matrix to exist, the number of entries in the row matrix must be the same as the number of entries in the column matrix.

Given A = 2 3 4 size 12{A= left [ matrix { 2 {} # 3 {} # 4{}} right ]} {} and B = 5 3 6 4 7 5 size 12{B= left [ matrix { 5 {} # 3 {} ##6 {} # 4 {} ## 7 {} # 5{}} right ]} {} , find the product AB size 12{ ital "AB"} {} .

We already know how to multiply a row matrix by a column matrix. To find the product AB size 12{ ital "AB"} {} , in this example, we will be multiplying the row matrix A size 12{A} {} to both the first and second columns of matrix B size 12{B} {} , resulting in a 1 × 2 size 12{1 times 2} {} matrix.

AB = 2 5 + 3 6 + 4 7 2 3 + 3 4 + 4 5 = 56 38 size 12{ ital "AB"= left [ matrix { 2 cdot 5+3 cdot 6+4 cdot 7 {} # 2 cdot 3+3 cdot 4+4 cdot 5{}} right ]= left [ matrix {"56" {} # "38"{} } right ]} {}

We have just multiplied a 1 × 3 size 12{1 times 3} {} matrix by a matrix whose size is 3 × 2 size 12{3 times 2} {} . So unlike addition and subtraction, it is possible to multiply two matrices with different dimensions as long as the number of entries in the rows of the first matrix are the same as the number of entries in columns of the second matrix.

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Given A = 2 3 4 1 2 3 size 12{A= left [ matrix { 2 {} # 3 {} # 4 {} ##1 {} # 2 {} # 3{} } right ]} {} and B = 5 3 6 4 7 5 size 12{B= left [ matrix { 5 {} # 3 {} ##6 {} # 4 {} ## 7 {} # 5{}} right ]} {} , find the product AB size 12{ ital "AB"} {} .

This time we are multiplying two rows of the matrix A size 12{A} {} with two columns of the matrix B size 12{B} {} . Since the number of entries in each row of A size 12{A} {} are the same as the number of entries in each column of B size 12{B} {} , the product is possible. We do exactly what we did in [link] . The only difference is that the matrix A size 12{A} {} has one more row.

We multiply the first row of the matrix A size 12{A} {} with the two columns of B size 12{B} {} , one at a time, and then repeat the process with the second row of A size 12{A} {} . We get

AB = 2 3 4 1 2 3 5 3 6 4 7 5 = 2 5 + 3 6 + 4 7 2 3 + 3 4 + 4 5 1 5 + 2 6 + 3 7 1 3 + 2 4 + 3 5 = 56 38 38 26 size 12{ matrix { ital "AB" {} # ={} {} # left [ matrix {2 {} # 3 {} # 4 {} ## 1 {} # 2 {} # 3{}} right ] left [ matrix {5 {} # 3 {} ## 6 {} # 4 {} ##7 {} # 5{} } right ]{} ## {} # ={} {} # left [ matrix {2 cdot 5+3 cdot 6+4 cdot 7 {} # 2 cdot 3+3 cdot 4+4 cdot 5 {} ## 1 cdot 5+2 cdot 6+3 cdot 7 {} # 1 cdot 3+2 cdot 4+3 cdot 5{}} right ] {} ##{} # ={} {} # left [ matrix { "56" {} # "38" {} ##"38" {} # "26"{} } right ]{} } } {}
Got questions? Get instant answers now!
Got questions? Get instant answers now!

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied finite mathematics. OpenStax CNX. Jul 16, 2011 Download for free at http://cnx.org/content/col10613/1.5
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied finite mathematics' conversation and receive update notifications?

Ask