Skip to content

Matrices and Matrix Operations

By the end of this section, you will be able to:

  • 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. The table below shows the needs of both teams.

WildcatsMud Cats
Goals610
Balls3024
Jerseys1420

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 brackets or parentheses, and are usually named with capital letters. For example, three matrices named AA, BB, and CC are shown below.

A=[1234],B=[127056782],C=[130231]A=\begin{bmatrix}1&2\\3&4\end{bmatrix},\quad B=\begin{bmatrix}1&2&7\\0&-5&6\\7&8&2\end{bmatrix},\quad C=\begin{bmatrix}-1&3\\0&2\\3&1\end{bmatrix}

Describing Matrices

A matrix is often referred to by its size or dimensions: m×nm\times n indicating mm rows and nn columns. Matrix entries are defined first by row and then by column. For example, to locate the entry in matrix AA identified as aija_{ij}, we look for the entry in row ii, column jj. In matrix AA, shown below, the entry in row 2, column 3 is a23a_{23}.

A=[a11a12a13a21a22a23a31a32a33]A=\begin{bmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{bmatrix}

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

A row matrix is a matrix consisting of one row with dimensions 1×n1\times n.

[a11a12a13]\begin{bmatrix}a_{11}&a_{12}&a_{13}\end{bmatrix}

A column matrix is a matrix consisting of one column with dimensions m×1m\times1.

[a11a21a31]\begin{bmatrix}a_{11}\\a_{21}\\a_{31}\end{bmatrix}

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: AA, BB, CC, and so on. Each entry in a matrix is referred to as aija_{ij}, such that ii represents the row and jj represents the column. Matrices are often referred to by their dimensions: m×nm\times n indicating mm rows and nn columns.

Example. Given matrix AA below: (a) What are the dimensions of matrix AA? (b) What are the entries at a31a_{31} and a22a_{22}?

A=[210247312]A=\begin{bmatrix}2&1&0\\2&4&7\\3&1&-2\end{bmatrix}

Solution. (a) The dimensions are 3×33\times3 because there are three rows and three columns. (b) Entry a31a_{31} is the number at row 3, column 1, which is 33. The entry a22a_{22} is the number at row 2, column 2, which is 44. 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\times3 matrix and another 3×33\times3 matrix, but we cannot add or subtract a 2×32\times3 matrix and a 3×33\times3 matrix because some entries in one matrix will not have a corresponding entry in the other matrix.

Adding and Subtracting Matrices. Given matrices AA and BB of like dimensions, addition and subtraction of AA and BB will produce matrix CC or matrix DD of the same dimension.

A+B=C such that aij+bij=cijA+B=C\ \text{such that}\ a_{ij}+b_{ij}=c_{ij}AB=D such that aijbij=dijA-B=D\ \text{such that}\ a_{ij}-b_{ij}=d_{ij}

Matrix addition is commutative.

A+B=B+AA+B=B+A

It is also associative.

(A+B)+C=A+(B+C)(A+B)+C=A+(B+C)

Example. Find the sum of AA and BB, given

A=[abcd]andB=[efgh]A=\begin{bmatrix}a&b\\c&d\end{bmatrix}\quad\text{and}\quad B=\begin{bmatrix}e&f\\g&h\end{bmatrix}

Solution. Add corresponding entries.

A+B=[abcd]+[efgh]A+B=\begin{bmatrix}a&b\\c&d\end{bmatrix}+\begin{bmatrix}e&f\\g&h\end{bmatrix}A+B=[a+eb+fc+gd+h]A+B=\begin{bmatrix}a+e&b+f\\c+g&d+h\end{bmatrix}

Example. Find the sum of AA and BB.

A=[4132]andB=[5907]A=\begin{bmatrix}4&1\\3&2\end{bmatrix}\quad\text{and}\quad B=\begin{bmatrix}5&9\\0&7\end{bmatrix}

Solution. Add corresponding entries. Add the entry in row 1, column 1, a11a_{11}, of matrix AA to the entry in row 1, column 1, b11b_{11}, of BB. Continue the pattern until all entries have been added.

A+B=[4132]+[5907]A+B=\begin{bmatrix}4&1\\3&2\end{bmatrix}+\begin{bmatrix}5&9\\0&7\end{bmatrix}A+B=[4+51+93+02+7]=[91039]A+B=\begin{bmatrix}4+5&1+9\\3+0&2+7\end{bmatrix}=\begin{bmatrix}9&10\\3&9\end{bmatrix}

Example. Find the difference of AA and BB.

A=[2301]andB=[8154]A=\begin{bmatrix}-2&3\\0&1\end{bmatrix}\quad\text{and}\quad B=\begin{bmatrix}8&1\\5&4\end{bmatrix}

Solution. We subtract the corresponding entries of each matrix.

AB=[2301][8154]A-B=\begin{bmatrix}-2&3\\0&1\end{bmatrix}-\begin{bmatrix}8&1\\5&4\end{bmatrix}AB=[28310514]=[10253]A-B=\begin{bmatrix}-2-8&3-1\\0-5&1-4\end{bmatrix}=\begin{bmatrix}-10&2\\-5&-3\end{bmatrix}

Example. Given AA and BB: (a) find the sum. (b) find the difference.

A=[2102141210422]andB=[61020124522]A=\begin{bmatrix}2&-10&-2\\14&12&10\\4&-2&2\end{bmatrix}\quad\text{and}\quad B=\begin{bmatrix}6&10&-2\\0&-12&-4\\-5&2&-2\end{bmatrix}

Solution. (a) Add the corresponding entries.

A+B=[2102141210422]+[61020124522]A+B=\begin{bmatrix}2&-10&-2\\14&12&10\\4&-2&2\end{bmatrix}+\begin{bmatrix}6&10&-2\\0&-12&-4\\-5&2&-2\end{bmatrix}A+B=[2+610+102214+01212104452+222]=[8041406100]A+B=\begin{bmatrix}2+6&-10+10&-2-2\\14+0&12-12&10-4\\4-5&-2+2&2-2\end{bmatrix}=\begin{bmatrix}8&0&-4\\14&0&6\\-1&0&0\end{bmatrix}

(b) Subtract the corresponding entries.

AB=[2102141210422][61020124522]A-B=\begin{bmatrix}2&-10&-2\\14&12&10\\4&-2&2\end{bmatrix}-\begin{bmatrix}6&10&-2\\0&-12&-4\\-5&2&-2\end{bmatrix}AB=[2610102+214012+1210+44+5222+2]=[4200142414944]A-B=\begin{bmatrix}2-6&-10-10&-2+2\\14-0&12+12&10+4\\4+5&-2-2&2+2\end{bmatrix}=\begin{bmatrix}-4&-20&0\\14&24&14\\9&-4&4\end{bmatrix}

Add matrixA=[261013]A=\begin{bmatrix}2&6\\1&0\\1&-3\end{bmatrix}and matrixB=[321543]B=\begin{bmatrix}3&-2\\1&5\\-4&3\end{bmatrix}. Enter the second row of the sumA+BA+Bas a comma-separated list of two numbers, left to right.

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 the table below.

Lab ALab B
Computers1527
Computer Tables1634
Chairs1634

Converting the data to a matrix, we have

C2013=[152716341634]C_{2013}=\begin{bmatrix}15&27\\16&34\\16&34\end{bmatrix}

To calculate how much computer equipment will be needed, we multiply all entries in matrix CC by 0.150.15.

(0.15)C2013=[(0.15)15(0.15)27(0.15)16(0.15)34(0.15)16(0.15)34]=[2.254.052.45.12.45.1](0.15)C_{2013}=\begin{bmatrix}(0.15)15&(0.15)27\\(0.15)16&(0.15)34\\(0.15)16&(0.15)34\end{bmatrix}=\begin{bmatrix}2.25&4.05\\2.4&5.1\\2.4&5.1\end{bmatrix}

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

[353636]\begin{bmatrix}3&5\\3&6\\3&6\end{bmatrix}

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

[152716341634]+[353636]=[183219401940]\begin{bmatrix}15&27\\16&34\\16&34\end{bmatrix}+\begin{bmatrix}3&5\\3&6\\3&6\end{bmatrix}=\begin{bmatrix}18&32\\19&40\\19&40\end{bmatrix}

This means

C2014=[183219401940]C_{2014}=\begin{bmatrix}18&32\\19&40\\19&40\end{bmatrix}

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=[a11a12a21a22]A=\begin{bmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{bmatrix}

the scalar multiple cAcA is

cA=c[a11a12a21a22]=[ca11ca12ca21ca22]cA=c\begin{bmatrix}a_{11}&a_{12}\\a_{21}&a_{22}\end{bmatrix}=\begin{bmatrix}ca_{11}&ca_{12}\\ca_{21}&ca_{22}\end{bmatrix}

Scalar multiplication is distributive. For the matrices AA, BB, and CC with scalars aa and bb,

a(A+B)=aA+aB(a+b)A=aA+bA \begin{array}{lrcl} & a(A+B) &=& aA+aB \\[4pt] & (a+b)A &=& aA+bA \end{array}

Example. Multiply matrix AA by the scalar 33.

A=[8154]A=\begin{bmatrix}8&1\\5&4\end{bmatrix}

Solution. Multiply each entry in AA by the scalar 33.

3A=3[8154]=[38313534]=[2431512]3A=3\begin{bmatrix}8&1\\5&4\end{bmatrix}=\begin{bmatrix}3\cdot8&3\cdot1\\3\cdot5&3\cdot4\end{bmatrix}=\begin{bmatrix}24&3\\15&12\end{bmatrix}

Given matrixB=[4132]B=\begin{bmatrix}4&1\\3&2\end{bmatrix}, find2B-2B. Enter the second row of2B-2Bas a comma-separated list of two numbers, left to right.

Example. Find the sum 3A+2B3A+2B.

A=[120012436]andB=[121032014]A=\begin{bmatrix}1&-2&0\\0&-1&2\\4&3&-6\end{bmatrix}\quad\text{and}\quad B=\begin{bmatrix}-1&2&1\\0&-3&2\\0&1&-4\end{bmatrix}

Solution. First, find 3A3A, then 2B2B.

3A=[313(2)30303(1)3234333(6)]=[36003612918]3A=\begin{bmatrix}3\cdot1&3(-2)&3\cdot0\\3\cdot0&3(-1)&3\cdot2\\3\cdot4&3\cdot3&3(-6)\end{bmatrix}=\begin{bmatrix}3&-6&0\\0&-3&6\\12&9&-18\end{bmatrix}2B=[2(1)2221202(3)2220212(4)]=[242064028]2B=\begin{bmatrix}2(-1)&2\cdot2&2\cdot1\\2\cdot0&2(-3)&2\cdot2\\2\cdot0&2\cdot1&2(-4)\end{bmatrix}=\begin{bmatrix}-2&4&2\\0&-6&4\\0&2&-8\end{bmatrix}

Now, add 3A+2B3A+2B.

3A+2B=[36003612918]+[242064028]3A+2B=\begin{bmatrix}3&-6&0\\0&-3&6\\12&9&-18\end{bmatrix}+\begin{bmatrix}-2&4&2\\0&-6&4\\0&2&-8\end{bmatrix}3A+2B=[326+40+20+0366+412+09+2188]=[1220910121126]3A+2B=\begin{bmatrix}3-2&-6+4&0+2\\0+0&-3-6&6+4\\12+0&9+2&-18-8\end{bmatrix}=\begin{bmatrix}1&-2&2\\0&-9&10\\12&11&-26\end{bmatrix}

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 AA is an m×rm\times r matrix and BB is an r×nr\times n matrix, then the product matrix ABAB is an m×nm\times n matrix. If the inner dimensions do not match, the product is not defined.

In this example, the product ABAB is possible because the number of columns in AA (three) is the same as the number of rows in BB (three): the inner dimensions match.

We multiply entries of AA with entries of BB 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 ii of ABAB, we multiply the entries in row ii of AA by column jj in BB and add. For example, given matrices AA and BB, where the dimensions of AA are 2×32\times3 and the dimensions of BB are 3×33\times3, the product of ABAB will be a 2×32\times3 matrix.

A=[a11a12a13a21a22a23]andB=[b11b12b13b21b22b23b31b32b33]A=\begin{bmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\end{bmatrix}\quad\text{and}\quad B=\begin{bmatrix}b_{11}&b_{12}&b_{13}\\b_{21}&b_{22}&b_{23}\\b_{31}&b_{32}&b_{33}\end{bmatrix}

Multiply and add as follows to obtain the first entry of the product matrix ABAB.

  • To obtain the entry in row 1, column 1 of ABAB, multiply the first row in AA by the first column in BB, and add.

    [a11a12a13][b11b21b31]=a11b11+a12b21+a13b31\begin{bmatrix}a_{11}&a_{12}&a_{13}\end{bmatrix}\begin{bmatrix}b_{11}\\b_{21}\\b_{31}\end{bmatrix}=a_{11}\cdot b_{11}+a_{12}\cdot b_{21}+a_{13}\cdot b_{31}
  • To obtain the entry in row 1, column 2 of ABAB, multiply the first row of AA by the second column in BB, and add.

    [a11a12a13][b12b22b32]=a11b12+a12b22+a13b32\begin{bmatrix}a_{11}&a_{12}&a_{13}\end{bmatrix}\begin{bmatrix}b_{12}\\b_{22}\\b_{32}\end{bmatrix}=a_{11}\cdot b_{12}+a_{12}\cdot b_{22}+a_{13}\cdot b_{32}
  • To obtain the entry in row 1, column 3 of ABAB, multiply the first row of AA by the third column in BB, and add.

    [a11a12a13][b13b23b33]=a11b13+a12b23+a13b33\begin{bmatrix}a_{11}&a_{12}&a_{13}\end{bmatrix}\begin{bmatrix}b_{13}\\b_{23}\\b_{33}\end{bmatrix}=a_{11}\cdot b_{13}+a_{12}\cdot b_{23}+a_{13}\cdot b_{33}

We proceed the same way to obtain the second row of ABAB: row 2 of AA times column 1 of BB; row 2 of AA times column 2 of BB; row 2 of AA times column 3 of BB. When complete, the product matrix will be

AB=[a11b11+a12b21+a13b31a11b12+a12b22+a13b32a11b13+a12b23+a13b33a21b11+a22b21+a23b31a21b12+a22b22+a23b32a21b13+a22b23+a23b33]AB=\begin{bmatrix}a_{11}\cdot b_{11}+a_{12}\cdot b_{21}+a_{13}\cdot b_{31}&a_{11}\cdot b_{12}+a_{12}\cdot b_{22}+a_{13}\cdot b_{32}&a_{11}\cdot b_{13}+a_{12}\cdot b_{23}+a_{13}\cdot b_{33}\\a_{21}\cdot b_{11}+a_{22}\cdot b_{21}+a_{23}\cdot b_{31}&a_{21}\cdot b_{12}+a_{22}\cdot b_{22}+a_{23}\cdot b_{32}&a_{21}\cdot b_{13}+a_{22}\cdot b_{23}+a_{23}\cdot b_{33}\end{bmatrix}

Properties of Matrix Multiplication. For the matrices AA, BB, and CC the following properties hold.

  • Matrix multiplication is associative: (AB)C=A(BC)(AB)C=A(BC).
  • Matrix multiplication is distributive: C(A+B)=CA+CBC(A+B)=CA+CB, and (A+B)C=AC+BC(A+B)C=AC+BC.

Note that matrix multiplication is not commutative.

Example. Multiply matrix AA and matrix BB.

A=[1234]andB=[5678]A=\begin{bmatrix}1&2\\3&4\end{bmatrix}\quad\text{and}\quad B=\begin{bmatrix}5&6\\7&8\end{bmatrix}

Solution. First, we check the dimensions of the matrices. Matrix AA has dimensions 2×22\times2 and matrix BB has dimensions 2×22\times2. The inner dimensions are the same so we can perform the multiplication. The product will have the dimensions 2×22\times2.

AB=[1234][5678]AB=\begin{bmatrix}1&2\\3&4\end{bmatrix}\cdot\begin{bmatrix}5&6\\7&8\end{bmatrix}AB=[1(5)+2(7)1(6)+2(8)3(5)+4(7)3(6)+4(8)]=[19224350]AB=\begin{bmatrix}1(5)+2(7)&1(6)+2(8)\\3(5)+4(7)&3(6)+4(8)\end{bmatrix}=\begin{bmatrix}19&22\\43&50\end{bmatrix}

Example. Given AA and BB: (a) find ABAB. (b) find BABA.

A=[123405]andB=[514023]A=\begin{bmatrix}-1&2&3\\4&0&5\end{bmatrix}\quad\text{and}\quad B=\begin{bmatrix}5&-1\\-4&0\\2&3\end{bmatrix}

Solution. (a) As the dimensions of AA are 2×32\times3 and the dimensions of BB are 3×23\times2, these matrices can be multiplied together because the number of columns in AA matches the number of rows in BB. The resulting product will be a 2×22\times2 matrix, the number of rows in AA by the number of columns in BB.

AB=[123405][514023]AB=\begin{bmatrix}-1&2&3\\4&0&5\end{bmatrix}\begin{bmatrix}5&-1\\-4&0\\2&3\end{bmatrix}AB=[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]AB=\begin{bmatrix}-1(5)+2(-4)+3(2)&-1(-1)+2(0)+3(3)\\4(5)+0(-4)+5(2)&4(-1)+0(0)+5(3)\end{bmatrix}=\begin{bmatrix}-7&10\\30&11\end{bmatrix}

(b) The dimensions of BB are 3×23\times2 and the dimensions of AA are 2×32\times3. The inner dimensions match so the product is defined and will be a 3×33\times3 matrix.

BA=[514023][123405]BA=\begin{bmatrix}5&-1\\-4&0\\2&3\end{bmatrix}\begin{bmatrix}-1&2&3\\4&0&5\end{bmatrix}BA=[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)]=[91010481210421]BA=\begin{bmatrix}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)\end{bmatrix}=\begin{bmatrix}-9&10&10\\4&-8&-12\\10&4&21\end{bmatrix}

Analysis. Notice that the products ABAB and BABA are not equal.

AB=[7103011][91010481210421]=BAAB=\begin{bmatrix}-7&10\\30&11\end{bmatrix}\ne\begin{bmatrix}-9&10&10\\4&-8&-12\\10&4&21\end{bmatrix}=BA

This illustrates the fact that matrix multiplication is not commutative.

Q&A. Is it possible for ABAB to be defined but not BABA?

Yes, consider a matrix AA with dimension 3×43\times4 and matrix BB with dimension 4×24\times2. For the product ABAB the inner dimensions are 44 and the product is defined, but for the product BABA the inner dimensions are 22 and 33, so the product is undefined.

Example. Let’s return to the problem presented at the opening of this section. We have the equipment-needs table above, representing the equipment needs of two soccer teams. We are also given the prices of the equipment, as shown in the table below.

ItemPrice
Goal$300
Ball$10
Jersey$30

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

E=[61030241420]E=\begin{bmatrix}6&10\\30&24\\14&20\end{bmatrix}

The cost matrix is written as

C=[3001030]C=\begin{bmatrix}300&10&30\end{bmatrix}

Solution. We perform matrix multiplication to obtain costs for the equipment.

CE=[3001030][61030241420]CE=\begin{bmatrix}300&10&30\end{bmatrix}\begin{bmatrix}6&10\\30&24\\14&20\end{bmatrix}CE=[300(6)+10(30)+30(14)300(10)+10(24)+30(20)]=[2,5203,840]CE=\begin{bmatrix}300(6)+10(30)+30(14)&300(10)+10(24)+30(20)\end{bmatrix}=\begin{bmatrix}2{,}520&3{,}840\end{bmatrix}

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][A], [B][B], [C][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. Find ABCAB-C given

A=[1525324172810342], B=[45213724521964831], and C=[1008998255674674275]A=\begin{bmatrix}-15&25&32\\41&-7&-28\\10&34&-2\end{bmatrix},\ B=\begin{bmatrix}45&21&-37\\-24&52&19\\6&-48&-31\end{bmatrix},\ \text{and}\ C=\begin{bmatrix}-100&-89&-98\\25&-56&74\\-67&42&-75\end{bmatrix}

Solution. On the matrix page of the calculator, we enter matrix AA above as the matrix variable [A][A], matrix BB above as the matrix variable [B][B], and matrix CC above as the matrix variable [C][C].

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

[A][B][C][A][B]-[C]

The calculator gives us the following matrix.

[9834621361,8201,8978563112,032413]\begin{bmatrix}-983&-462&136\\1{,}820&1{,}897&-856\\-311&2{,}032&413\end{bmatrix}

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. A 3×23\times2 matrix has three rows and two columns.
  • We add and subtract matrices of equal dimensions by adding and subtracting corresponding entries of each matrix.
  • Scalar multiplication involves multiplying each entry in a matrix by a constant.
  • Scalar multiplication is often required before addition or subtraction can occur.
  • 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, AA and BB, is obtained by multiplying each entry in row 1 of AA by each entry in column 1 of BB; then multiply each entry of row 1 of AA by each entry in column 2 of BB, and so on.
  • Many real-world problems can often be solved using matrices.
  • We can use a calculator to perform matrix operations after saving each matrix as a matrix variable.

Practice

Find the sum and difference of two matrices

GivenC=[15892126]C=\begin{bmatrix}1&5\\8&92\\12&6\end{bmatrix}andD=[101472561]D=\begin{bmatrix}10&14\\7&2\\5&61\end{bmatrix}, findC+DC+D. Enter the second row of the sum as a comma-separated list of two numbers, left to right.

GivenB=[214226]B=\begin{bmatrix}2&14\\22&6\end{bmatrix}andE=[612145]E=\begin{bmatrix}6&12\\14&5\end{bmatrix}, findBEB-E. Enter the first row of the difference as a comma-separated list of two numbers, left to right.

GivenD=[101472561]D=\begin{bmatrix}10&14\\7&2\\5&61\end{bmatrix}andB=[214226]B=\begin{bmatrix}2&14\\22&6\end{bmatrix}, isDBD-Bdefined?

Find scalar multiples of a matrix

GivenB=[392112064]B=\begin{bmatrix}3&9\\21&12\\0&64\end{bmatrix}, find3B3B. Enter the third row of3B3Bas a comma-separated list of two numbers, left to right.

GivenC=[163718905329]C=\begin{bmatrix}16&3&7&18\\90&5&3&29\end{bmatrix}, find4C-4C. Enter the first row of4C-4Cas a comma-separated list of four numbers, left to right.

GivenD=[18121381467421]D=\begin{bmatrix}18&12&13\\8&14&6\\7&4&21\end{bmatrix}, find100D100D. Enter the second row of100D100Das a comma-separated list of three numbers, left to right.

Find the product of two matrices

GivenB=[3648012]B=\begin{bmatrix}3&6&4\\-8&0&12\end{bmatrix}andC=[4102659]C=\begin{bmatrix}4&10\\-2&6\\5&9\end{bmatrix}, findBCBC. Enter the first row of the product as a comma-separated list of two numbers, left to right.

GivenB=[3648012]B=\begin{bmatrix}3&6&4\\-8&0&12\end{bmatrix}andD=[23129310810]D=\begin{bmatrix}2&-3&12\\9&3&1\\0&8&-10\end{bmatrix}, findBDBD. Enter the second row of the product as a comma-separated list of three numbers, left to right.

GivenC=[4102659]C=\begin{bmatrix}4&10\\-2&6\\5&9\end{bmatrix}andB=[3648012]B=\begin{bmatrix}3&6&4\\-8&0&12\end{bmatrix}, which matrix is the productCBCB?


This section is adapted from Precalculus 2e, Section 9.5: Matrices and Matrix Operations by Jay Abramson and OpenStax, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: omitted a coreq-skills block the pinned CNXML prepends before the section proper (its own “Objective 1”/“Objective 2” review of writing an augmented matrix and adding/subtracting/scalar-multiplying matrices, keyed to Intermediate Algebra 4.5) — confirmed against the printed PDF, page 947 runs straight from the previous section’s exercises into “Two club soccer teams…”; the same prepended-block pattern is already logged in this book’s errata for §§4.3–4.8, and this section joins that list. Omitted the decorative soccer-action photograph (Figure 1, a stock action shot credited “SD Dirk,” Flickr) and the “Access these online resources” media links. The equipment-needs table is printed twice in the source (once at the section opener, once again as “Table 3” inside the real-world Example) with identical data; this page shows it once and Example 10 refers back to “the table above.” Recreated the inner-dimensions schematic ("ABA\cdot B", labeled 2×32\times3 and 3×33\times3 with a brace reading “same”) as an accessible spec-first figure instead of the source’s raster image. The grader cannot take a matrix-shaped answer (the MathLive matrix-entry path is menu-only and untested for learners), so — following house precedent from Intermediate Algebra 4.5 — every retained Try It and every Practice item whose source answer is a full matrix is either re-posed as a row-entry fill-in (“enter the second row… as a comma-separated list”) or, where recognizing a whole computed matrix is itself the point, a multiple choice among full matrices (KaTeX renders bmatrix fine in option bodies; only submitted answers are restricted). The “is DBD-B defined?” item is likewise multiple choice, since a dimension-mismatch verdict is categorical, not a number. Nine selected end-of-section exercises were adapted into interactive Practice components, three per objective, every one independently re-derived (including by running the arithmetic in Node) rather than read off the source key.