Learning

open
close

Matrices and Matrix Operations

June 23, 2024 | by Bloom Code Studio

Learning Objectives

In this section, you will:

  • Find the sum and difference of two matrices.
  • Find scalar multiples of a matrix.
  • Find the product of two matrices.

Figure 1 (credit: β€œSD Dirk,” Flickr)

Two club soccer teams, the Wildcats and the Mud Cats, are hoping to obtain new equipment for an upcoming season. Table 1 shows the needs of both teams.

WildcatsMud Cats
Goals610
Balls3024
Jerseys1420
TableΒ 1

A goal costs $300; a ball costs $10; and a jersey costs $30. How can we find the total cost for the equipment needed for each team? In this section, we discover a method in which the data in the soccer equipment table can be displayed and used for calculating other information. Then, we will be able to calculate the cost of the equipment.

Finding the Sum and Difference of Two Matrices

To solve a problem like the one described for the soccer teams, we can use a matrix, which is a rectangular array of numbers. A row in a matrix is a set of numbers that are aligned horizontally. A column in a matrix is a set of numbers that are aligned vertically. Each number is an entry, sometimes called an element, of the matrix. Matrices (plural) are enclosed in [ ] or ( ), and are usually named with capital letters. For example, three matrices named A,B,𝐴,𝐡, and C𝐢 are shown below.

A=[1324],B=⎑⎣⎒1072βˆ’58762⎀⎦βŽ₯,C=βŽ‘βŽ£βŽ’βˆ’103321⎀⎦βŽ₯𝐴=[1234],𝐡=[1270βˆ’56782],𝐢=[βˆ’103321]

Describing Matrices

A matrix is often referred to by its size or dimensions: mΓ—nπ‘šΓ—π‘› indicating mπ‘š rows and n𝑛 columns. Matrix entries are defined first by row and then by column. For example, to locate the entry in matrix A𝐴 identified as aij,π‘Žπ‘–π‘—, we look for the entry in row i,𝑖, column j.𝑗. In matrix A,  𝐴,   shown below, the entry in row 2, column 3 is a23.π‘Ž23.

A=⎑⎣⎒a11a21a31a12a22a32a13a23a33⎀⎦βŽ₯𝐴=[π‘Ž11π‘Ž12π‘Ž13π‘Ž21π‘Ž22π‘Ž23π‘Ž31π‘Ž32π‘Ž33]

A square matrix is a matrix with dimensions nΓ—n,𝑛×𝑛, meaning that it has the same number of rows as columns. The 3Γ—33Γ—3 matrix above is an example of a square matrix.

A row matrix is a matrix consisting of one row with dimensions 1Γ—n.1×𝑛.

[a11a12a13][π‘Ž11π‘Ž12π‘Ž13]

A column matrix is a matrix consisting of one column with dimensions mΓ—1.π‘šΓ—1.

⎑⎣⎒a11a21a31⎀⎦βŽ₯[π‘Ž11π‘Ž21π‘Ž31]

A matrix may be used to represent a system of equations. In these cases, the numbers represent the coefficients of the variables in the system. Matrices often make solving systems of equations easier because they are not encumbered with variables. We will investigate this idea further in the next section, but first we will look at basic matrix operations.

MATRICES

matrix is a rectangular array of numbers that is usually named by a capital letter: A,B,C,𝐴,𝐡,𝐢, and so on. Each entry in a matrix is referred to as aij,π‘Žπ‘–π‘—, such that i𝑖 represents the row and j𝑗 represents the column. Matrices are often referred to by their dimensions: mΓ—nπ‘šΓ—π‘› indicating mπ‘š rows and n𝑛 columns.

EXAMPLE 1

Finding the Dimensions of the Given Matrix and Locating Entries

Given matrix A:𝐴:

  1. ⓐWhat are the dimensions of matrixΒ A?𝐴?
  2. β“‘What are the entries atΒ a31π‘Ž31Β andΒ a22?π‘Ž22?A=⎑⎣⎒22314107βˆ’2⎀⎦βŽ₯𝐴=[21024731βˆ’2]

Solution

  1. ⓐThe dimensions areΒ 3Γ—33Γ—3Β because there are three rows and three columns.
  2. β“‘EntryΒ a31π‘Ž31Β is the number at row 3, column 1, which is 3. The entryΒ a22π‘Ž22Β is the number at row 2, column 2, which is 4. Remember, the row comes first, then the column.

Adding and Subtracting Matrices

We use matrices to list data or to represent systems. Because the entries are numbers, we can perform operations on matrices. We add or subtract matrices by adding or subtracting corresponding entries.

In order to do this, the entries must correspond. Therefore, addition and subtraction of matrices is only possible when the matrices have the same dimensions. We can add or subtract a 3Γ—33Γ—3 matrix and another 3Γ—33Γ—3 matrix, but we cannot add or subtract a 2Γ—32Γ—3 matrix and a 3Γ—33Γ—3 matrix because some entries in one matrix will not have a corresponding entry in the other matrix.

ADDING AND SUBTRACTING MATRICES

Given matrices A𝐴 and B𝐡 of like dimensions, addition and subtraction of A𝐴 and B𝐡 will produce matrix C𝐢 or
matrix D𝐷 of the same dimension.

A+B=Csuch that aij+bij=cij𝐴+𝐡=𝐢such that π‘Žπ‘–𝑗+𝑏𝑖𝑗=𝑐𝑖𝑗

Aβˆ’B=Dsuch that aijβˆ’bij=dijπ΄βˆ’π΅=𝐷such that π‘Žπ‘–π‘—βˆ’π‘π‘–π‘—=𝑑𝑖𝑗

Matrix addition is commutative.

A+B=B+A𝐴+𝐡=𝐡+𝐴

It is also associative.

(A+B)+C=A+(B+C)(𝐴+𝐡)+𝐢=𝐴+(𝐡+𝐢)

EXAMPLE 2

Finding the Sum of Matrices

Find the sum of A𝐴 and B,𝐡, given

A=[acbd]  and  B=[egfh]𝐴=[π‘Žπ‘π‘π‘‘]  and  π΅=[π‘’π‘“π‘”β„Ž]

Solution

Add corresponding entries.

A+B=[acbd]+[egfh]        =[a+ec+gb+fd+h]𝐴+𝐡=[π‘Žπ‘π‘π‘‘]+[π‘’π‘“π‘”β„Ž]        =[π‘Ž+𝑒𝑏+𝑓𝑐+𝑔𝑑+β„Ž]

EXAMPLE 3

Adding Matrix and Matrix B

Find the sum of A𝐴 and B.𝐡.

A=[4312] and  B=[5097]𝐴=[4132] and  π΅=[5907]

Solution

Add corresponding entries. Add the entry in row 1, column 1, a11,π‘Ž11, of matrix A𝐴 to the entry in row 1, column 1, b11,𝑏11, of B.𝐡. Continue the pattern until all entries have been added.

A+B=[4312]+[5097]        =[4+53+01+92+7]        =[93109]𝐴+𝐡=[4132]+[5907]        =[4+51+93+02+7]        =[91039]

EXAMPLE 4

Finding the Difference of Two Matrices

Find the difference of A𝐴 and B.𝐡.

A=[βˆ’2031] and  B=[8514]𝐴=[βˆ’2301] and  π΅=[8154]

Solution

We subtract the corresponding entries of each matrix.

Aβˆ’B=[βˆ’2031]βˆ’[8514]        =[βˆ’2βˆ’80βˆ’53βˆ’11βˆ’4]        =[βˆ’10βˆ’52βˆ’3]π΄βˆ’π΅=[βˆ’2301]βˆ’[8154]        =[βˆ’2βˆ’83βˆ’10βˆ’51βˆ’4]        =[βˆ’102βˆ’5βˆ’3]

EXAMPLE 5

Finding the Sum and Difference of Two 3 x 3 Matrices

Given A𝐴 and B:𝐡:

  1. ⓐFind the sum.
  2. β“‘Find the difference.

A=⎑⎣⎒2144βˆ’1012βˆ’2βˆ’2102⎀⎦βŽ₯and B=⎑⎣⎒60βˆ’510βˆ’122βˆ’2βˆ’4βˆ’2⎀⎦βŽ₯𝐴=[2βˆ’10βˆ’21412104βˆ’22]and π΅=[610βˆ’20βˆ’12βˆ’4βˆ’52βˆ’2]

Solution

  1. ⓐAdd the corresponding entries.A+B=⎑⎣⎒2144βˆ’1012βˆ’2βˆ’2102⎀⎦βŽ₯+⎑⎣⎒60βˆ’510βˆ’122βˆ’2βˆ’4βˆ’2⎀⎦βŽ₯=⎑⎣⎒2+614+04βˆ’5βˆ’10+1012βˆ’12βˆ’2+2βˆ’2βˆ’210βˆ’42βˆ’2⎀⎦βŽ₯=⎑⎣⎒814βˆ’1000βˆ’460⎀⎦βŽ₯𝐴+𝐡=[2βˆ’10βˆ’21412104βˆ’22]+[610βˆ’20βˆ’12βˆ’4βˆ’52βˆ’2]=[2+6βˆ’10+10βˆ’2βˆ’214+012βˆ’1210βˆ’44βˆ’5βˆ’2+22βˆ’2]=[80βˆ’41406βˆ’100]
  2. β“‘Subtract the corresponding entries.Aβˆ’B=⎑⎣⎒2144βˆ’1012βˆ’2βˆ’2102⎀⎦βŽ₯βˆ’βŽ‘βŽ£βŽ’60βˆ’510βˆ’122βˆ’2βˆ’4βˆ’2⎀⎦βŽ₯=⎑⎣⎒2βˆ’614βˆ’04+5βˆ’10βˆ’1012+12βˆ’2βˆ’2βˆ’2+210+42+2⎀⎦βŽ₯=βŽ‘βŽ£βŽ’βˆ’4149βˆ’2024βˆ’40144⎀⎦βŽ₯π΄βˆ’π΅=[2βˆ’10βˆ’21412104βˆ’22]βˆ’[610βˆ’20βˆ’12βˆ’4βˆ’52βˆ’2]=[2βˆ’6βˆ’10βˆ’10βˆ’2+214βˆ’012+1210+44+5βˆ’2βˆ’22+2]=[βˆ’4βˆ’2001424149βˆ’44]

TRY IT #1

Add matrix A𝐴 and matrix B.𝐡.

A=⎑⎣⎒21160βˆ’3⎀⎦βŽ₯ and  B=⎑⎣⎒31βˆ’4βˆ’253⎀⎦βŽ₯𝐴=[26101βˆ’3] and  π΅=[3βˆ’215βˆ’43]

Finding Scalar Multiples of a Matrix

Besides adding and subtracting whole matrices, there are many situations in which we need to multiply a matrix by a constant called a scalar. Recall that a scalar is a real number quantity that has magnitude, but not direction. For example, time, temperature, and distance are scalar quantities. The process of scalar multiplication involves multiplying each entry in a matrix by a scalar. A scalar multiple is any entry of a matrix that results from scalar multiplication.

Consider a real-world scenario in which a university needs to add to its inventory of computers, computer tables, and chairs in two of the campus labs due to increased enrollment. They estimate that 15% more equipment is needed in both labs. The school’s current inventory is displayed in Table 2.

Lab ALab B
Computers1527
Computer Tables1634
Chairs1634
TableΒ 2

Converting the data to a matrix, we have

C2013=⎑⎣⎒151616273434⎀⎦βŽ₯𝐢2013=[151616273434]

To calculate how much computer equipment will be needed, we multiply all entries in matrix C𝐢 by 0.15.

(0.15)C2013=⎑⎣⎒(0.15)15(0.15)16(0.15)16(0.15)27(0.15)34(0.15)34⎀⎦βŽ₯=⎑⎣⎒2.252.42.44.055.15.1⎀⎦βŽ₯(0.15)𝐢2013=[(0.15)15(0.15)16(0.15)16(0.15)27(0.15)34(0.15)34]=[2.252.42.44.055.15.1]

We must round up to the next integer, so the amount of new equipment needed is

⎑⎣⎒333566⎀⎦βŽ₯[333566]

Adding the two matrices as shown below, we see the new inventory amounts.

⎑⎣⎒151616273434⎀⎦βŽ₯+⎑⎣⎒333566⎀⎦βŽ₯=⎑⎣⎒181919324040⎀⎦βŽ₯[151616273434]+[333566]=[181919324040]

This means

C2014=⎑⎣⎒181919324040⎀⎦βŽ₯𝐢2014=[181919324040]

Thus, Lab A will have 18 computers, 19 computer tables, and 19 chairs; Lab B will have 32 computers, 40 computer tables, and 40 chairs.

SCALAR MULTIPLICATION

Scalar multiplication involves finding the product of a constant by each entry in the matrix. Given

A=[a11a21a12a22]𝐴=[π‘Ž11π‘Ž12π‘Ž21π‘Ž22]

the scalar multiple cA𝑐𝐴 is

cA=c[a11a21a12a22]   =[ca11ca21ca12ca22]𝑐𝐴=𝑐[π‘Ž11π‘Ž12π‘Ž21π‘Ž22]   =[π‘π‘Ž11π‘π‘Ž12π‘π‘Ž21π‘π‘Ž22]

Scalar multiplication is distributive. For the matrices A,B,𝐴,𝐡, and C𝐢 with scalars aπ‘Ž and b,𝑏,

a(A+B)=aA+aB(a+b)A=aA+bAπ‘Ž(𝐴+𝐡)=π‘Žπ΄+π‘Žπ΅(π‘Ž+𝑏)𝐴=π‘Žπ΄+𝑏𝐴

EXAMPLE 6

Multiplying the Matrix by a Scalar

Multiply matrix A𝐴 by the scalar 3.

A=[8514]𝐴=[8154]

Solution

Multiply each entry in A𝐴 by the scalar 3.

3A=3[8514]= [3β‹…83β‹…53β‹…13β‹…4]= [2415312]3𝐴=3[8154]= [3β‹…83β‹…13β‹…53β‹…4]= [2431512]

TRY IT #2

Given matrix B,𝐡, find βˆ’2Bβˆ’2𝐡 where

B=[4312]𝐡=[4132]

EXAMPLE 7

Finding the Sum of Scalar Multiples

Find the sum 3A+2B.3𝐴+2𝐡.

A=⎑⎣⎒104βˆ’2βˆ’1302βˆ’6⎀⎦βŽ₯and B=βŽ‘βŽ£βŽ’βˆ’1002βˆ’3112βˆ’4⎀⎦βŽ₯𝐴=[1βˆ’200βˆ’1243βˆ’6]and π΅=[βˆ’1210βˆ’3201βˆ’4]

Solution

First, find 3A,3𝐴, then 2B.2𝐡.

3A=⎑⎣⎒3β‹…13β‹…03β‹…43(βˆ’2)3(βˆ’1)3β‹…33β‹…03β‹…23(βˆ’6)⎀⎦βŽ₯=⎑⎣⎒3012βˆ’6βˆ’3906βˆ’18⎀⎦βŽ₯3𝐴=[3β‹…13(βˆ’2)3β‹…03β‹…03(βˆ’1)3β‹…23β‹…43β‹…33(βˆ’6)]=[3βˆ’600βˆ’36129βˆ’18]

2B=⎑⎣⎒2(βˆ’1)2β‹…02β‹…02β‹…22(βˆ’3)2β‹…12β‹…12β‹…22(βˆ’4)⎀⎦βŽ₯=βŽ‘βŽ£βŽ’βˆ’2004βˆ’6224βˆ’8⎀⎦βŽ₯2𝐡=[2(βˆ’1)2β‹…22β‹…12β‹…02(βˆ’3)2β‹…22β‹…02β‹…12(βˆ’4)]=[βˆ’2420βˆ’6402βˆ’8]

Now, add 3A+2B.3𝐴+2𝐡.

3A+2B=⎑⎣⎒3012βˆ’6βˆ’3906βˆ’18⎀⎦βŽ₯+βŽ‘βŽ£βŽ’βˆ’2004βˆ’6224βˆ’8⎀⎦βŽ₯            =⎑⎣⎒3βˆ’20+012+0βˆ’6+4βˆ’3βˆ’69+20+26+4βˆ’18βˆ’8⎀⎦βŽ₯            =⎑⎣⎒1012βˆ’2βˆ’911210βˆ’26⎀⎦βŽ₯3𝐴+2𝐡=[3βˆ’600βˆ’36129βˆ’18]+[βˆ’2420βˆ’6402βˆ’8]            =[3βˆ’2βˆ’6+40+20+0βˆ’3βˆ’66+412+09+2βˆ’18βˆ’8]            =[1βˆ’220βˆ’9101211βˆ’26]

Finding the Product of Two Matrices

In addition to multiplying a matrix by a scalar, we can multiply two matrices. Finding the product of two matrices is only possible when the inner dimensions are the same, meaning that the number of columns of the first matrix is equal to the number of rows of the second matrix. If A𝐴 is an mΓ—rπ‘šΓ—π‘Ÿ matrix and B𝐡 is an rΓ—nπ‘ŸΓ—π‘› matrix, then the product matrix AB𝐴𝐡 is an mΓ—nπ‘šΓ—π‘› matrix. For example, the product AB𝐴𝐡 is possible because the number of columns in A𝐴 is the same as the number of rows in B.𝐡. If the inner dimensions do not match, the product is not defined.

We multiply entries of A𝐴 with entries of B𝐡 according to a specific pattern as outlined below. The process of matrix multiplication becomes clearer when working a problem with real numbers.

To obtain the entries in row i𝑖 of AB,𝐴𝐡, we multiply the entries in row i𝑖 of A𝐴 by column j𝑗 in B𝐡 and add. For example, given matrices A𝐴 and B,𝐡, where the dimensions of A𝐴 are 2Γ—32Γ—3 and the dimensions of B𝐡 are 3Γ—3,3Γ—3, the product of AB𝐴𝐡 will be a 2Γ—32Γ—3 matrix.

A=[a11a21a12a22a13a23]and B=⎑⎣⎒b11b21b31b12b22b32b13b23b33⎀⎦βŽ₯𝐴=[π‘Ž11π‘Ž12π‘Ž13π‘Ž21π‘Ž22π‘Ž23]and π΅=[𝑏11𝑏12𝑏13𝑏21𝑏22𝑏23𝑏31𝑏32𝑏33]

Multiply and add as follows to obtain the first entry of the product matrix AB.𝐴𝐡.

  1. To obtain the entry in row 1, column 1 ofΒ AB,𝐴𝐡,Β multiply the first row inΒ A𝐴 by the first column inΒ B,𝐡,Β and add.[a11a12a13]⎑⎣⎒b11b21b31⎀⎦βŽ₯=a11β‹…b11+a12β‹…b21+a13β‹…b31[π‘Ž11π‘Ž12π‘Ž13][𝑏11𝑏21𝑏31]=π‘Ž11⋅𝑏11+π‘Ž12⋅𝑏21+π‘Ž13⋅𝑏31
  2. To obtain the entry in row 1, column 2 ofΒ AB,𝐴𝐡,Β multiply the first row ofΒ A𝐴 by the second column inΒ B,𝐡,Β and add.[a11a12a13]⎑⎣⎒b12b22b32⎀⎦βŽ₯=a11β‹…b12+a12β‹…b22+a13β‹…b32[π‘Ž11π‘Ž12π‘Ž13][𝑏12𝑏22𝑏32]=π‘Ž11⋅𝑏12+π‘Ž12⋅𝑏22+π‘Ž13⋅𝑏32
  3. To obtain the entry in row 1, column 3 ofΒ AB,𝐴𝐡,Β multiply the first row ofΒ A𝐴 by the third column inΒ B,𝐡,Β and add.[a11a12a13]⎑⎣⎒b13b23b33⎀⎦βŽ₯=a11β‹…b13+a12β‹…b23+a13β‹…b33[π‘Ž11π‘Ž12π‘Ž13][𝑏13𝑏23𝑏33]=π‘Ž11⋅𝑏13+π‘Ž12⋅𝑏23+π‘Ž13⋅𝑏33

We proceed the same way to obtain the second row of AB.𝐴𝐡. In other words, row 2 of A𝐴 times column 1 of B;𝐡; row 2 of A𝐴 times column 2 of B;𝐡; row 2 of A𝐴 times column 3 of B.𝐡. When complete, the product matrix will be

AB=⎑⎣⎒a11β‹…b11+a12β‹…b21+a13β‹…b31a21β‹…b11+a22β‹…b21+a23β‹…b31a11β‹…b12+a12β‹…b22+a13β‹…b32a21β‹…b12+a22β‹…b22+a23β‹…b32a11β‹…b13+a12β‹…b23+a13β‹…b33a21β‹…b13+a22β‹…b23+a23β‹…b33⎀⎦βŽ₯𝐴𝐡=[π‘Ž11⋅𝑏11+π‘Ž12⋅𝑏21+π‘Ž13⋅𝑏31π‘Ž21⋅𝑏11+π‘Ž22⋅𝑏21+π‘Ž23⋅𝑏31π‘Ž11⋅𝑏12+π‘Ž12⋅𝑏22+π‘Ž13⋅𝑏32π‘Ž21⋅𝑏12+π‘Ž22⋅𝑏22+π‘Ž23⋅𝑏32π‘Ž11⋅𝑏13+π‘Ž12⋅𝑏23+π‘Ž13⋅𝑏33π‘Ž21⋅𝑏13+π‘Ž22⋅𝑏23+π‘Ž23⋅𝑏33]

PROPERTIES OF MATRIX MULTIPLICATION

For the matrices A,B,𝐴,𝐡, and C𝐢 the following properties hold.

  • Matrix multiplication is associative:Β (AB)C=A(BC).(𝐴𝐡)𝐢=𝐴(𝐡𝐢).
  • Matrix multiplication is distributive:Β C(A+B)=CA+CB,(A+B)C=AC+BC.𝐢(𝐴+𝐡)=𝐢𝐴+𝐢𝐡,(𝐴+𝐡)𝐢=𝐴𝐢+𝐡𝐢.

Note that matrix multiplication is not commutative.

EXAMPLE 8

Multiplying Two Matrices

Multiply matrix A𝐴 and matrix B.𝐡.

A=[1324] and  B=[5768]𝐴=[1234] and  π΅=[5678]

Solution

First, we check the dimensions of the matrices. Matrix A𝐴 has dimensions 2Γ—22Γ—2 and matrix B𝐡 has dimensions 2Γ—2.2Γ—2. The inner dimensions are the same so we can perform the multiplication. The product will have the dimensions 2Γ—2.2Γ—2.

We perform the operations outlined previously.

EXAMPLE 9

Multiplying Two Matrices

Given A𝐴 and B:𝐡:

  1. ⓐ FindΒ AB.𝐴𝐡.
  2. β“‘Β FindΒ BA.𝐡𝐴.

A=[βˆ’123405]and  B=⎑⎣⎒5βˆ’42βˆ’103⎀⎦βŽ₯𝐴=[βˆ’123405]and  π΅=[5βˆ’42βˆ’103]

Solution

  1. ⓐAs the dimensions ofΒ A𝐴 areΒ 2Γ—32Γ—3Β and the dimensions ofΒ B𝐡 areΒ 3Γ—2,3Γ—2,Β these matrices can be multiplied together because the number of columns inΒ A𝐴 matches the number of rows inΒ B.𝐡.Β The resulting product will be aΒ 2Γ—22Γ—2Β matrix, the number of rows inΒ A𝐴 by the number of columns inΒ B.𝐡.AB=[βˆ’142035]  ⎑⎣⎒5βˆ’42βˆ’103⎀⎦βŽ₯=[βˆ’1(5)+2(βˆ’4)+3(2)4(5)+0(βˆ’4)+5(2)βˆ’1(βˆ’1)+2(0)+3(3)4(βˆ’1)+0(0)+5(3)]=[βˆ’7301011]𝐴𝐡=[βˆ’123405]Β Β [5βˆ’1βˆ’4023]=[βˆ’1(5)+2(βˆ’4)+3(2)βˆ’1(βˆ’1)+2(0)+3(3)4(5)+0(βˆ’4)+5(2)4(βˆ’1)+0(0)+5(3)]=[βˆ’7103011]
  2. β“‘The dimensions ofΒ B𝐡 areΒ 3Γ—23Γ—2Β and the dimensions ofΒ A𝐴 areΒ 2Γ—3.2Γ—3.Β The inner dimensions match so the product is defined and will be aΒ 3Γ—33Γ—3Β matrix.BA=⎑⎣⎒5βˆ’42βˆ’103⎀⎦βŽ₯Β Β [βˆ’142035]=⎑⎣⎒5(βˆ’1)+βˆ’1(4)βˆ’4(βˆ’1)+0(4)2(βˆ’1)+3(4)5(2)+βˆ’1(0)βˆ’4(2)+0(0)2(2)+3(0)5(3)+βˆ’1(5)βˆ’4(3)+0(5)2(3)+3(5)⎀⎦βŽ₯=βŽ‘βŽ£βŽ’βˆ’941010βˆ’8410βˆ’1221⎀⎦βŽ₯𝐡𝐴=[5βˆ’1βˆ’4023]Β Β [βˆ’123405]=[5(βˆ’1)+βˆ’1(4)5(2)+βˆ’1(0)5(3)+βˆ’1(5)βˆ’4(βˆ’1)+0(4)βˆ’4(2)+0(0)βˆ’4(3)+0(5)2(βˆ’1)+3(4)2(2)+3(0)2(3)+3(5)]=[βˆ’910104βˆ’8βˆ’1210421]

Analysis

Notice that the products AB𝐴𝐡 and BA𝐡𝐴 are not equal.

AB=[βˆ’7301011]β‰ βŽ‘βŽ£βŽ’βˆ’941010βˆ’8410βˆ’1221⎀⎦βŽ₯=BA𝐴𝐡=[βˆ’7103011]β‰ [βˆ’910104βˆ’8βˆ’1210421]=𝐡𝐴

This illustrates the fact that matrix multiplication is not commutative.

Q&A

Is it possible for AB to be defined but not BA?

Yes, consider a matrix A with dimensionΒ 3Γ—43Γ—4Β and matrix B with dimensionΒ 4Γ—2.4Γ—2.Β For the product AB the inner dimensions are 4 and the product is defined, but for the product BA the inner dimensions are 2 and 3 so the product is undefined.

EXAMPLE 10

Using Matrices in Real-World Problems

Let’s return to the problem presented at the opening of this section. We haveΒ Table 3, representing the equipment needs of two soccer teams.

WildcatsMud Cats
Goals610
Balls3024
Jerseys1420
TableΒ 3

We are also given the prices of the equipment, as shown inΒ Table 4.

Goal$300
Ball$10
Jersey$30
TableΒ 4

We will convert the data to matrices. Thus, the equipment need matrix is written as

E=⎑⎣⎒63014102420⎀⎦βŽ₯𝐸=[63014102420]

The cost matrix is written as

C=[3001030]𝐢=[3001030]

We perform matrix multiplication to obtain costs for the equipment.

CE=[3001030]⎑⎣⎒63014102420⎀⎦βŽ₯=[300(6)+10(30)+30(14)300(10)+10(24)+30(20)]=[2,5203,840]𝐢𝐸=[3001030][61030241420]=[300(6)+10(30)+30(14)300(10)+10(24)+30(20)]=[2,5203,840]

The total cost for equipment for the Wildcats is $2,520, and the total cost for equipment for the Mud Cats is $3,840.

HOW TO

Given a matrix operation, evaluate using a calculator.

  1. Save each matrix as a matrix variableΒ [A],[B],[C],…[𝐴],[𝐡],[𝐢],…
  2. Enter the operation into the calculator, calling up each matrix variable as needed.
  3. If the operation is defined, the calculator will present the solution matrix; if the operation is undefined, it will display an error message.

EXAMPLE 11

Using a Calculator to Perform Matrix Operations

Find ABβˆ’Cπ΄π΅βˆ’πΆ given

A=βŽ‘βŽ£βŽ’βˆ’15411025βˆ’73432βˆ’28βˆ’2⎀⎦βŽ₯,B=⎑⎣⎒45βˆ’2462152βˆ’48βˆ’3719βˆ’31⎀⎦βŽ₯,and C=βŽ‘βŽ£βŽ’βˆ’10025βˆ’67βˆ’89βˆ’5642βˆ’9874βˆ’75⎀⎦βŽ₯.𝐴=[βˆ’15253241βˆ’7βˆ’281034βˆ’2],𝐡=[4521βˆ’37βˆ’2452196βˆ’48βˆ’31],and πΆ=[βˆ’100βˆ’89βˆ’9825βˆ’5674βˆ’6742βˆ’75].

Solution

On the matrix page of the calculator, we enter matrix A𝐴 above as the matrix variable [A],[𝐴], matrix B𝐡 above as the matrix variable [B],[𝐡], and matrix C𝐢 above as the matrix variable [C].[𝐢].

On the home screen of the calculator, we type in the problem and call up each matrix variable as needed.

[A][B]βˆ’[C][𝐴][𝐡]βˆ’[𝐢]

The calculator gives us the following matrix.

βŽ‘βŽ£βŽ’βˆ’9831,820βˆ’311βˆ’4621,8972,032136βˆ’856413⎀⎦βŽ₯[βˆ’983βˆ’4621361,8201,897βˆ’856βˆ’3112,032413]

RELATED POSTS

View all

view all