Multiply a matrix by a scalar, sum scalar multiples of matrices
Multiply two matrices together
Use a calculator to perform operations on matrices
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 the table below.
Lab A
Lab B
Computers
15
27
Computer Tables
16
34
Chairs
16
34
Converting the data to a matrix, we have
C2013=151616273434
To calculate how much computer equipment will be needed, we multiply all entries in matrix C by 0.15.
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×3 and the dimensions of B are 3×3, the product of AB will be a 2×3 matrix.
A=[a11a21a12a22a13a23] and B=b11b21b31b12b22b32b13b23b33
Multiply and add as follows to obtain the first entry of the product matrix AB.
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.
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
A General Note: 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: Multiplying Two Matrices
Multiply matrix A and matrix B.
A=[1324] and B=[5768]
Answer:
First, we check the dimensions of the matrices. Matrix A has dimensions 2×2 and matrix B has dimensions 2×2. The inner dimensions are the same so we can perform the multiplication. The product will have the dimensions 2×2.
We perform the operations outlined previously.
Example: Multiplying Two Matrices
Given A and B:
Find AB.
Find BA.
A=[−123405] and B=5−42−103
Answer:
As the dimensions of A are 2×3 and the dimensions of B are 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×2 matrix, the number of rows in A by the number of columns in B.
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×4 and matrix B with dimension 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: Using Matrices in Real-World Problems
Let’s return to the problem presented at the opening of this section. We have the table below, representing the equipment needs of two soccer teams.
Wildcats
Mud Cats
Goals
6
10
Balls
30
24
Jerseys
14
20
We are also given the prices of the equipment, as shown in the table below.
Goal
$300
Ball
$10
Jersey
$30
We will convert the data to matrices. Thus, the equipment need matrix is written as
E=63014102420
The cost matrix is written as
C=[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]
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.
Save each matrix as a matrix variable
[A],[B],[C],..
Enter the operation into the calculator, calling up each matrix variable as needed.
If the operation is defined, the calculator will present the solution matrix; if the operation is undefined, it will display an error message.
Example: Using a Calculator to Perform Matrix Operations
Answer:
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
Licenses & Attributions
CC licensed content, Original
Revision and Adaptation.Provided by: Lumen LearningLicense: CC BY: Attribution.
CC licensed content, Shared previously
College Algebra.Provided by: OpenStaxAuthored by: Abramson, Jay et al..License: CC BY: Attribution. License terms: Download for free at http://cnx.org/contents/9b08c294-057f-4201-9f48-5d6ad992740d@5.2.
Question ID 6386.Authored by: Dow,David D., mb Sousa,James.License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.