Binary matrix Operations: General Engineering



Chapter 04.03

Binary Matrix Operations

After reading this chapter, you should be able to

1. add, subtract, and multiply matrices, and

2. apply rules of binary operations on matrices.

How do you add two matrices?

Two matrices [pic] and [pic] can be added only if they are the same size. The addition is then shown as

[pic]

where

[pic]

Example 1

Add the following two matrices.

[pic] [pic]

Solution

[pic]

[pic]

[pic]

[pic]

Example 2

Blowout r’us store has two store locations [pic] and [pic], and their sales of tires are given by make (in rows) and quarters (in columns) as shown below.

[pic]

[pic]

where the rows represent the sale of Tirestone, Michigan and Copper tires respectively and the columns represent the quarter number: 1, 2, 3 and 4. What are the total tire sales for the two locations by make and quarter?

Solution

[pic]

=[pic]+[pic]

=[pic]

[pic]

So if one wants to know the total number of Copper tires sold in quarter 4 at the two locations, we would look at Row 3 – Column 4 to give [pic]

How do you subtract two matrices?

Two matrices [pic] and [pic] can be subtracted only if they are the same size. The subtraction is then given by

[pic]

Where

[pic]

Example 3

Subtract matrix [pic] from matrix [pic].

[pic]

[pic]

Solution

[pic]

[pic]

[pic]

[pic]

Example 4

Blowout r’us has two store locations [pic] and [pic] and their sales of tires are given by make (in rows) and quarters (in columns) as shown below.

[pic]

[pic]

where the rows represent the sale of Tirestone, Michigan and Copper tires respectively and the columns represent the quarter number: 1, 2, 3, and 4. How many more tires did store [pic] sell than store [pic] of each brand in each quarter?

Solution

[pic]

=[pic]

[pic]

[pic]

So if you want to know how many more Copper tires were sold in quarter 4 in store [pic] than store [pic], [pic]. Note that [pic] implies that store [pic] sold 1 less Michigan tire than store [pic] in quarter 3.

How do I multiply two matrices?

Two matrices [pic] and [pic] can be multiplied only if the number of columns of [pic] is equal to the number of rows of [pic] to give

[pic]

If [pic] is a [pic] matrix and [pic] is a [pic] matrix, the resulting matrix [pic] is a [pic] matrix.

So how does one calculate the elements of [pic] matrix?

[pic]

[pic]

for each [pic]and [pic].

To put it in simpler terms, the [pic] row and [pic] column of the [pic] matrix in [pic] is calculated by multiplying the [pic] row of [pic] by the [pic] column of [pic], that is,

[pic]

[pic]

Example 5

Given

[pic]

[pic]

Find

[pic]

Solution

[pic]can be found by multiplying the first row of [pic] by the second column of [pic],

[pic]

[pic]

[pic]

Similarly, one can find the other elements of [pic] to give

[pic]

Example 6

Blowout r’us store location A and the sales of tires are given by make (in rows) and quarters (in columns) as shown below

[pic]

where the rows represent the sale of Tirestone, Michigan and Copper tires respectively and the columns represent the quarter number: 1, 2, 3, and 4. Find the per quarter sales of store [pic] if the following are the prices of each tire.

Tirestone = $33.25

Michigan = $40.19

Copper = $25.03

Solution

The answer is given by multiplying the price matrix by the quantity of sales of store [pic]. The price matrix is [pic], so the per quarter sales of store [pic] would be given by

[pic]

[pic]

[pic][pic]

[pic]

[pic]

[pic]

Similarly

[pic]

Therefore, each quarter sales of store [pic] in dollars is given by the four columns of the row vector

[pic]

Remember since we are multiplying a 1[pic]3 matrix by a 3[pic]4 matrix, the resulting matrix is a 1[pic]4 matrix.

What is the scalar multiplication of a matrix?

If [pic] is a [pic] matrix and [pic] is a real number, then the multiplication [pic] by a scalar [pic] is another [pic] matrix [pic], where

[pic] for all i, j.

Example 7

Let

[pic]

Find [pic]

Solution

[pic]

[pic]

[pic]

What is a linear combination of matrices?

If [pic] are matrices of the same size and [pic] are scalars, then

[pic]

is called a linear combination of [pic].

Example 8

If [pic]

find

[pic]

Solution

[pic]

[pic]

[pic]

[pic]

What are some of the rules of binary matrix operations?

Commutative law of addition

If [pic] and [pic] are [pic] matrices, then

[pic]

Associative law of addition

If [A], [B] and [C] are all [pic] matrices, then

[pic]

Associative law of multiplication

If [pic], [pic] and [pic] are [pic] size matrices, respectively, then

[pic]

and the resulting matrix size on both sides of the equation is [pic]

Distributive law

If [pic] and [pic] are [pic] size matrices, and [pic] and [pic] are [pic] size matrices

[pic]

[pic]

and the resulting matrix size on both sides of the equation is [pic]

Example 9

Illustrate the associative law of multiplication of matrices using

[pic]

Solution

[pic][pic]

[pic]

[pic]

[pic]

[pic]

[pic]

[pic]

[pic]

The above illustrates the associative law of multiplication of matrices.

Is [A][B] = [B][A]?

If [pic][pic] exists, number of columns of [pic] has to be same as the number of rows of [pic] and if [pic] exists, number of columns of [pic] has to be same as the number of rows of [pic]. Now for [pic], the resulting matrix from [pic] and [pic] has to be of the same size. This is only possible if [pic] and [pic] are square and are of the same size. Even then in general [pic]

Example 10

Determine if

[pic]

for the following matrices[pic]

[pic]

Solution

[pic] [pic]

=[pic]

[pic][pic]

[pic]

[pic]

Key Terms:

Addition of matrices

Subtraction of matrices

Multiplication of matrices

Scalar Product of matrices

Linear Combination of Matrices

Rules of Binary Matrix Operation

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download