Systems of Equations and Inequalities

# Matrices and Matrix Operations

### 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.

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

Wildcats Mud Cats
Goals 6 10
Balls 30 24
Jerseys 14 20

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 namedandare shown below. #### Describing Matrices A matrix is often referred to by its size or dimensions:indicatingrows andcolumns. Matrix entries are defined first by row and then by column. For example, to locate the entry in matrixidentified aswe look for the entry in rowcolumnIn matrixshown below, the entry in row 2, column 3 is A square matrix is a matrix with dimensionsmeaning that it has the same number of rows as columns. Thematrix above is an example of a square matrix. A row matrix is a matrix consisting of one row with dimensions A column matrix is a matrix consisting of one column with dimensions 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 A matrix is a rectangular array of numbers that is usually named by a capital letter:and so on. Each entry in a matrix is referred to assuch thatrepresents the row andrepresents the column. Matrices are often referred to by their dimensions:indicatingrows andcolumns. ### Finding the Dimensions of the Given Matrix and Locating Entries Given matrix 1. What are the dimensions of matrix 2. What are the entries atand [reveal-answer q=”fs-id1165134379500″]Show Solution[/reveal-answer] [hidden-answer a=”fs-id1165134379500″] 1. The dimensions arebecause there are three rows and three columns. 2. Entryis the number at row 3, column 1, which is 3. The entryis the number at row 2, column 2, which is 4. Remember, the row comes first, then the column. [/hidden-answer] #### 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 amatrix and anothermatrix, but we cannot add or subtract amatrix and amatrix because some entries in one matrix will not have a corresponding entry in the other matrix. ### Adding and Subtracting Matrices Given matricesandof like dimensions, addition and subtraction ofandwill produce matrixor Matrix addition is commutative. It is also associative. ### Finding the Sum of Matrices Find the sum ofandgiven [reveal-answer q=”fs-id1165131851993″]Show Solution[/reveal-answer] [hidden-answer a=”fs-id1165131851993″] Add corresponding entries. [/hidden-answer] ### Adding Matrix A and Matrix B Find the sum ofand [reveal-answer q=”fs-id1165134061952″]Show Solution[/reveal-answer] [hidden-answer a=”fs-id1165134061952″] Add corresponding entries. Add the entry in row 1, column 1,of matrixto the entry in row 1, column 1,ofContinue the pattern until all entries have been added. [/hidden-answer] ### Finding the Difference of Two Matrices Find the difference ofand [reveal-answer q=”fs-id1165137933939″]Show Solution[/reveal-answer] [hidden-answer a=”fs-id1165137933939″] We subtract the corresponding entries of each matrix. [/hidden-answer] ### Finding the Sum and Difference of Two 3 x 3 Matrices Givenand 1. Find the sum. 2. Find the difference. [reveal-answer q=”297288″]Show Solution[/reveal-answer] [hidden-answer a=”297288″] 1. Add the corresponding entries. 2. Subtract the corresponding entries. [/hidden-answer] ### Try It Add matrixand matrix [reveal-answer q=”fs-id1165134557977″]Show Solution[/reveal-answer] [hidden-answer a=”fs-id1165134557977″] [/hidden-answer] ### 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 (Figure). Lab A Lab B Computers 15 27 Computer Tables 16 34 Chairs 16 34 Converting the data to a matrix, we have To calculate how much computer equipment will be needed, we multiply all entries in matrixby 0.15. We must round up to the next integer, so the amount of new equipment needed is Adding the two matrices as shown below, we see the new inventory amounts. This means 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 the scalar multipleis Scalar multiplication is distributive. For the matricesand with scalarsand ### Multiplying the Matrix by a Scalar Multiply matrixby the scalar 3. [reveal-answer q=”fs-id1165133103962″]Show Solution[/reveal-answer] [hidden-answer a=”fs-id1165133103962″] Multiply each entry inby the scalar 3. [/hidden-answer] ### Try It Given matrixfindwhere [reveal-answer q=”fs-id1165132912710″]Show Solution[/reveal-answer] [hidden-answer a=”fs-id1165132912710″] [/hidden-answer] ### Finding the Sum of Scalar Multiples Find the sum [reveal-answer q=”fs-id1165137834785″]Show Solution[/reveal-answer] [hidden-answer a=”fs-id1165137834785″] First, findthen Now, add [/hidden-answer] ### 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. Ifis anmatrix andis anmatrix, then the product matrixis anmatrix. For example, the productis possible because the number of columns inis the same as the number of rows inIf the inner dimensions do not match, the product is not defined. We multiply entries ofwith entries ofaccording 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 rowofwe multiply the entries in rowof by columninand add. For example, given matrices andwhere the dimensions ofareand the dimensions ofarethe product ofwill be amatrix. Multiply and add as follows to obtain the first entry of the product matrix 1. To obtain the entry in row 1, column 1 ofmultiply the first row inby the first column inand add. 2. To obtain the entry in row 1, column 2 ofmultiply the first row of by the second column inand add. 3. To obtain the entry in row 1, column 3 ofmultiply the first row ofby the third column inand add. We proceed the same way to obtain the second row ofIn other words, row 2 oftimes column 1 ofrow 2 oftimes column 2 ofrow 2 oftimes column 3 ofWhen complete, the product matrix will be ### Properties of Matrix Multiplication For the matricesandthe following properties hold. • Matrix multiplication is associative: • Matrix multiplication is distributive: Note that matrix multiplication is not commutative. ### Multiplying Two Matrices Multiply matrixand matrix [reveal-answer q=”fs-id1165137475669″]Show Solution[/reveal-answer] [hidden-answer a=”fs-id1165137475669″] First, we check the dimensions of the matrices. Matrixhas dimensionsand matrixhas dimensionsThe inner dimensions are the same so we can perform the multiplication. The product will have the dimensions We perform the operations outlined previously. [/hidden-answer] ### Multiplying Two Matrices Givenand 1. Find 2. Find [reveal-answer q=”707230″]Show Solution[/reveal-answer] [hidden-answer a=”707230″] 1. As the dimensions ofareand the dimensions ofarethese matrices can be multiplied together because the number of columns inmatches the number of rows inThe resulting product will be amatrix, the number of rows inby the number of columns in 2. The dimensions ofareand the dimensions ofareThe inner dimensions match so the product is defined and will be amatrix. [/hidden-answer] #### Analysis Notice that the productsandare not equal. This illustrates the fact that matrix multiplication is not commutative. Is it possible for AB to be defined but not BA? Yes, consider a matrix A with dimensionand matrix B with dimensionFor 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. ### Using Matrices in Real-World Problems Let’s return to the problem presented at the opening of this section. We have (Figure), 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 (Figure).  Goal300 Ball $10 Jersey$30

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

The cost matrix is written as

We perform matrix multiplication to obtain costs for the equipment.

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
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.

### Using a Calculator to Perform Matrix Operations

Find given

[hidden-answer a=”301100″]On the matrix page of the calculator, we enter matrixabove as the matrix variablematrixabove as the matrix variableand matrixabove as the matrix variable

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

The calculator gives us the following matrix.

Access these online resources for additional instruction and practice with matrices and matrix operations.

### Key Concepts

• A matrix is a rectangular array of numbers. Entries are arranged in rows and columns.
• The dimensions of a matrix refer to the number of rows and the number of columns. Amatrix has three rows and two columns. See (Figure).
• We add and subtract matrices of equal dimensions by adding and subtracting corresponding entries of each matrix. See (Figure), (Figure), (Figure), and (Figure).
• Scalar multiplication involves multiplying each entry in a matrix by a constant. See (Figure).
• Scalar multiplication is often required before addition or subtraction can occur. See (Figure).
• Multiplying matrices is possible when inner dimensions are the same—the number of columns in the first matrix must match the number of rows in the second.
• The product of two matrices,andis obtained by multiplying each entry in row 1 ofby each entry in column 1 ofthen multiply each entry of row 1 ofby each entry in columns 2 ofand so on. See (Figure) and (Figure).
• Many real-world problems can often be solved using matrices. See (Figure).
• We can use a calculator to perform matrix operations after saving each matrix as a matrix variable. See (Figure).

### Section Exercises

#### Verbal

Can we add any two matrices together? If so, explain why; if not, explain why not and give an example of two matrices that cannot be added together.

No, they must have the same dimensions. An example would include two matrices of different dimensions. One cannot add the following two matrices because the first is amatrix and the second is amatrix.has no sum.

Can we multiply any column matrix by any row matrix? Explain why or why not.

Can both the productsandbe defined? If so, explain how; if not, explain why.

Yes, if the dimensions ofareand the dimensions ofareboth products will be defined.

Can any two matrices of the same size be multiplied? If so, explain why, and if not, explain why not and give an example of two matrices of the same size that cannot be multiplied together.

Does matrix multiplication commute? That is, doesIf so, prove why it does. If not, explain why it does not.

Not necessarily. To findwe multiply the first row ofby the first column ofto get the first entry ofTo findwe multiply the first row ofby the first column ofto get the first entry ofThus, if those are unequal, then the matrix multiplication does not commute.

#### Algebraic

For the following exercises, use the matrices below and perform the matrix addition or subtraction. Indicate if the operation is undefined.

Undidentified; dimensions do not match

For the following exercises, use the matrices below to perform scalar multiplication.

For the following exercises, use the matrices below to perform matrix multiplication.

For the following exercises, use the matrices below to perform the indicated operation if possible. If not possible, explain why the operation cannot be performed.

Undefined; dimensions do not match.

For the following exercises, use the matrices below to perform the indicated operation if possible. If not possible, explain why the operation cannot be performed. (Hint:)

Undefined; inner dimensions do not match.

For the following exercises, use the matrices below to perform the indicated operation if possible. If not possible, explain why the operation cannot be performed. (Hint:)

#### Technology

For the following exercises, use the matrices below to perform the indicated operation if possible. If not possible, explain why the operation cannot be performed. Use a calculator to verify your solution.

#### Extensions

For the following exercises, use the matrix below to perform the indicated operation on the given matrix.

Using the above questions, find a formula forTest the formula forandusing a calculator.

### Glossary

column
a set of numbers aligned vertically in a matrix
entry
an element, coefficient, or constant in a matrix
matrix
a rectangular array of numbers
row
a set of numbers aligned horizontally in a matrix
scalar multiple
an entry of a matrix that has been multiplied by a scalar