{"id":15279,"date":"2021-10-11T22:48:50","date_gmt":"2021-10-11T22:48:50","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/chapter\/matrices-and-matrix-operations\/"},"modified":"2022-01-09T20:16:49","modified_gmt":"2022-01-09T20:16:49","slug":"matrices-and-matrix-operations","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/chapter\/matrices-and-matrix-operations\/","title":{"raw":"Matrices and Matrix Operations (optional)","rendered":"Matrices and Matrix Operations (optional)"},"content":{"raw":"<div class=\"bcc-box bcc-highlight\">\r\n<h3>Learning Outcomes<\/h3>\r\nBy the end of this section, you will be able to:\r\n<ul>\r\n \t<li>Find the sum and difference of two matrices.<\/li>\r\n \t<li>Find scalar multiples of a matrix.<\/li>\r\n \t<li>Find the product of two matrices.<\/li>\r\n<\/ul>\r\n<\/div>\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"488\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27181421\/CNX_Precalc_Figure_09_05_001n2.jpg\" alt=\"Two teams playing soccer.\" width=\"488\" height=\"493\" \/> <b>Figure 1.<\/b> (credit: \"SD Dirk,\" Flickr)[\/caption]\r\n\r\nTwo club soccer teams, the Wildcats and the Mud Cats, are hoping to obtain new equipment for an upcoming season. <a class=\"autogenerated-content\" href=\"#Table_09_05_01\">[link]<\/a> shows the needs of both teams.\r\n<table id=\"Table_09_05_01\" summary=\"..\">\r\n<thead>\r\n<tr>\r\n<th><\/th>\r\n<th>Wildcats<\/th>\r\n<th>Mud Cats<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>Goals<\/strong><\/td>\r\n<td>6<\/td>\r\n<td>10<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Balls<\/strong><\/td>\r\n<td>30<\/td>\r\n<td>24<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Jerseys<\/strong><\/td>\r\n<td>14<\/td>\r\n<td>20<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nA 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.\r\n<h2>Finding the Sum and Difference of Two Matrices<\/h2>\r\nTo solve a problem like the one described for the soccer teams, we can use a <strong>matrix<\/strong>, which is a rectangular array of numbers. A <strong>row<\/strong> in a matrix is a set of numbers that are aligned horizontally. A <strong>column<\/strong> in a matrix is a set of numbers that are aligned vertically. Each number is an <strong>entry<\/strong>, 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 [latex]A,B,\\text{}[\/latex] and [latex]C[\/latex] are shown below.\r\n<div style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}1&amp; 2\\\\ 3&amp; 4\\end{array}\\right],B=\\left[\\begin{array}{ccc}1&amp; 2&amp; 7\\\\ 0&amp; -5&amp; 6\\\\ 7&amp; 8&amp; 2\\end{array}\\right],C=\\left[\\begin{array}{c}-1\\\\ 0\\\\ 3\\end{array}\\begin{array}{c}3\\\\ 2\\\\ 1\\end{array}\\right][\/latex]<\/div>\r\n<h2>Describing Matrices<\/h2>\r\nA matrix is often referred to by its size or dimensions: [latex]\\text{ }m\\text{ }\\times \\text{ }n\\text{ }[\/latex] indicating [latex]m[\/latex] rows and [latex]n[\/latex] columns. Matrix entries are defined first by row and then by column. For example, to locate the entry in matrix [latex]A[\/latex] identified as [latex]{a}_{ij},\\text{}[\/latex] we look for the entry in row [latex]i,\\text{}[\/latex] column [latex]j[\/latex]. In matrix [latex]A\\text{, \\hspace{0.17em}}[\/latex] shown below, the entry in row 2, column 3 is [latex]{a}_{23}[\/latex].\r\n<div style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{ccc}{a}_{11}&amp; {a}_{12}&amp; {a}_{13}\\\\ {a}_{21}&amp; {a}_{22}&amp; {a}_{23}\\\\ {a}_{31}&amp; {a}_{32}&amp; {a}_{33}\\end{array}\\right][\/latex]<\/div>\r\nA <strong>square matrix<\/strong> is a matrix with dimensions [latex]\\text{ }n\\text{ }\\times \\text{ }n,\\text{}[\/latex] meaning that it has the same number of rows as columns. The [latex]3\\times 3[\/latex] matrix above is an example of a square matrix.\r\n\r\nA <strong>row matrix<\/strong> is a matrix consisting of one row with dimensions [latex]1\\text{ }\\times \\text{ }n[\/latex].\r\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{ccc}{a}_{11}&amp; {a}_{12}&amp; {a}_{13}\\end{array}\\right][\/latex]<\/div>\r\nA <strong>column matrix<\/strong> is a matrix consisting of one column with dimensions [latex]m\\text{ }\\times \\text{ }1[\/latex].\r\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{c}{a}_{11}\\\\ {a}_{21}\\\\ {a}_{31}\\end{array}\\right][\/latex]<\/div>\r\nA 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 <strong>matrix operations<\/strong>.\r\n<div class=\"textbox\">\r\n<h3>A General Note: Matrices<\/h3>\r\nA <strong>matrix<\/strong> is a rectangular array of numbers that is usually named by a capital letter: [latex]A,B,C,\\text{}[\/latex] and so on. Each entry in a matrix is referred to as [latex]{a}_{ij}[\/latex], such that [latex]i[\/latex] represents the row and [latex]j[\/latex] represents the column. Matrices are often referred to by their dimensions: [latex]m\\times n[\/latex] indicating [latex]m[\/latex] rows and [latex]n[\/latex] columns.\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Finding the Dimensions of the Given Matrix and Locating Entries<\/h3>\r\nGiven matrix [latex]A:[\/latex]\r\n<ol>\r\n \t<li>What are the dimensions of matrix [latex]A?[\/latex]<\/li>\r\n \t<li>What are the entries at [latex]{a}_{31}[\/latex] and [latex]{a}_{22}?[\/latex]<\/li>\r\n<\/ol>\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrrr} 2&amp;&amp; 1&amp; 0\\\\ 2&amp;&amp; 4&amp; 7\\\\ 3&amp;&amp; 1&amp; -2\\end{array}\\right][\/latex]<\/p>\r\n[reveal-answer q=\"832047\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"832047\"]\r\n<ol>\r\n \t<li>The dimensions are [latex]\\text{ }3\\text{ }\\times \\text{ }3\\text{ }[\/latex] because there are three rows and three columns.<\/li>\r\n \t<li>Entry [latex]{a}_{31}[\/latex] is the number at row 3, column 1, which is 3. The entry [latex]{a}_{22}[\/latex] is the number at row 2, column 2, which is 4. Remember, the row comes first, then the column.<\/li>\r\n<\/ol>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<h2>Adding and Subtracting Matrices<\/h2>\r\nWe 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.\r\n\r\nIn order to do this, the entries must correspond. Therefore, <em>addition and subtraction of matrices is only possible when the matrices have the same dimensions<\/em>. We can add or subtract a [latex]\\text{ }3\\text{ }\\times \\text{ }3\\text{ }[\/latex] matrix and another [latex]\\text{ }3\\text{ }\\times \\text{ }3\\text{ }[\/latex] matrix, but we cannot add or subtract a [latex]\\text{ }2\\text{ }\\times \\text{ }3\\text{ }[\/latex] matrix and a [latex]\\text{ }3\\text{ }\\times \\text{ }3\\text{ }[\/latex] matrix because some entries in one matrix will not have a corresponding entry in the other matrix.\r\n<div class=\"textbox\">\r\n<h3>A General Note: Adding and Subtracting Matrices<\/h3>\r\nGiven matrices [latex]A[\/latex] and [latex]B[\/latex] of like dimensions, addition and subtraction of [latex]A[\/latex] and [latex]B[\/latex] will produce matrix [latex]C[\/latex] or\u00a0matrix [latex]D[\/latex] of the same dimension.\r\n<p style=\"text-align: center;\">[latex]A+B=C\\text{ such that }{a}_{ij}+{b}_{ij}={c}_{ij}[\/latex]<\/p>\r\n<p style=\"text-align: center;\">[latex]A-B=D\\text{ such that }{a}_{ij}-{b}_{ij}={d}_{ij}[\/latex]<\/p>\r\nMatrix addition is commutative.\r\n<p style=\"text-align: center;\">[latex]A+B=B+A[\/latex]<\/p>\r\nIt is also associative.\r\n<p style=\"text-align: center;\">[latex]\\left(A+B\\right)+C=A+\\left(B+C\\right)[\/latex]<\/p>\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Finding the Sum of Matrices<\/h3>\r\nFind the sum of [latex]A[\/latex] and [latex]B,\\text{}[\/latex] given\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}a&amp; b\\\\ c&amp; d\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{cc}e&amp; f\\\\ g&amp; h\\end{array}\\right][\/latex]<\/p>\r\n[reveal-answer q=\"3634\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"3634\"]\r\nAdd corresponding entries.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}A+B=\\left[\\begin{array}{cc}a&amp; b\\\\ c&amp; d\\end{array}\\right]+\\left[\\begin{array}{cc}e&amp; f\\\\ g&amp; h\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{ccc}a+e&amp; &amp; b+f\\\\ c+g&amp; &amp; d+h\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Adding Matrix <em>A <\/em>and Matrix B<\/h3>\r\nFind the sum of [latex]A[\/latex] and [latex]B[\/latex].\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}4&amp; 1\\\\ 3&amp; 2\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{cc}5&amp; 9\\\\ 0&amp; 7\\end{array}\\right][\/latex]<\/p>\r\n[reveal-answer q=\"512431\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"512431\"]\r\nAdd corresponding entries. Add the entry in row 1, column 1, [latex]{a}_{11},\\text{}[\/latex] of matrix [latex]A[\/latex] to the entry in row 1, column 1, [latex]{b}_{11}[\/latex], of [latex]B[\/latex]. Continue the pattern until all entries have been added.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}A+B=\\left[\\begin{array}{cc}4&amp; 1\\\\ 3&amp; 2\\end{array}\\right]+\\left[\\begin{array}{cc}5&amp; 9\\\\ 0&amp; 7\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{ccc}4+5&amp; &amp; 1+9\\\\ 3+0&amp; &amp; 2+7\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{cc}9&amp; 10\\\\ 3&amp; 9\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Finding the Difference of Two Matrices<\/h3>\r\nFind the difference of [latex]A[\/latex] and [latex]B[\/latex].\r\n[latex]A=\\left[\\begin{array}{cc}-2&amp; 3\\\\ 0&amp; 1\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{cc}8&amp; 1\\\\ 5&amp; 4\\end{array}\\right][\/latex]\r\n\r\n[reveal-answer q=\"83802\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"83802\"]\r\n\r\nWe subtract the corresponding entries of each matrix.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}A-B=\\left[\\begin{array}{rr}\\hfill -2&amp; \\hfill 3\\\\ \\hfill 0&amp; \\hfill 1\\end{array}\\right]-\\left[\\begin{array}{rr}\\hfill 8&amp; \\hfill 1\\\\ \\hfill 5&amp; \\hfill 4\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill -2 - 8&amp; \\hfill &amp; \\hfill 3 - 1\\\\ \\hfill 0 - 5&amp; \\hfill &amp; \\hfill 1 - 4\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill -10&amp; \\hfill &amp; \\hfill 2\\\\ \\hfill -5&amp; \\hfill &amp; \\hfill -3\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Finding the Sum and Difference of Two 3 x 3 Matrices<\/h3>\r\nGiven [latex]A[\/latex] and [latex]B:[\/latex]\r\n<ol>\r\n \t<li>Find the sum.<\/li>\r\n \t<li>Find the difference.<\/li>\r\n<\/ol>\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrr}\\hfill 2&amp; \\hfill -10&amp; \\hfill -2\\\\ \\hfill 14&amp; \\hfill 12&amp; \\hfill 10\\\\ \\hfill 4&amp; \\hfill -2&amp; \\hfill 2\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{rrr}\\hfill 6&amp; \\hfill 10&amp; \\hfill -2\\\\ \\hfill 0&amp; \\hfill -12&amp; \\hfill -4\\\\ \\hfill -5&amp; \\hfill 2&amp; \\hfill -2\\end{array}\\right][\/latex]<\/p>\r\n[reveal-answer q=\"286263\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"286263\"]\r\n<ol>\r\n \t<li>Add the corresponding entries.\r\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ A+B=\\left[\\begin{array}{rrr}\\hfill 2&amp; \\hfill -10&amp; \\hfill -2\\\\ \\hfill 14&amp; \\hfill 12&amp; \\hfill 10\\\\ \\hfill 4&amp; \\hfill -2&amp; \\hfill 2\\end{array}\\right]+\\left[\\begin{array}{rrr}\\hfill 6&amp; \\hfill 10&amp; \\hfill -2\\\\ \\hfill 0&amp; \\hfill -12&amp; \\hfill -4\\\\ \\hfill -5&amp; \\hfill 2&amp; \\hfill -2\\end{array}\\right]\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill 2+6&amp; \\hfill -10+10&amp; \\hfill -2 - 2\\\\ \\hfill 14+0&amp; \\hfill 12 - 12&amp; \\hfill 10 - 4\\\\ \\hfill 4 - 5&amp; \\hfill -2+2&amp; \\hfill 2 - 2\\end{array}\\right]\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill 8&amp; \\hfill 0&amp; \\hfill -4\\\\ \\hfill 14&amp; \\hfill 0&amp; \\hfill 6\\\\ \\hfill -1&amp; \\hfill 0&amp; \\hfill 0\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/div><\/li>\r\n \t<li>Subtract the corresponding entries.\r\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ A-B=\\left[\\begin{array}{rrr}\\hfill 2&amp; \\hfill -10&amp; \\hfill -2\\\\ \\hfill 14&amp; \\hfill 12&amp; \\hfill 10\\\\ \\hfill 4&amp; \\hfill -2&amp; \\hfill 2\\end{array}\\right]-\\left[\\begin{array}{rrr}\\hfill 6&amp; \\hfill 10&amp; \\hfill -2\\\\ \\hfill 0&amp; \\hfill -12&amp; \\hfill -4\\\\ \\hfill -5&amp; \\hfill 2&amp; \\hfill -2\\end{array}\\right]\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill 2 - 6&amp; \\hfill -10 - 10&amp; \\hfill -2+2\\\\ \\hfill 14 - 0&amp; \\hfill 12+12&amp; \\hfill 10+4\\\\ \\hfill 4+5&amp; \\hfill -2 - 2&amp; \\hfill 2+2\\end{array}\\right]\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill -4&amp; \\hfill -20&amp; \\hfill 0\\\\ \\hfill 14&amp; \\hfill 24&amp; \\hfill 14\\\\ \\hfill 9&amp; \\hfill -4&amp; \\hfill 4\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/div><\/li>\r\n<\/ol>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3>Try It<\/h3>\r\nAdd matrix [latex]A[\/latex] and matrix [latex]B[\/latex].\r\n\r\n[latex]A=\\left[\\begin{array}{rr}\\hfill 2&amp; \\hfill 6\\\\ \\hfill 1&amp; \\hfill 0\\\\ \\hfill 1&amp; \\hfill -3\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{rr}\\hfill 3&amp; \\hfill -2\\\\ \\hfill 1&amp; \\hfill 5\\\\ \\hfill -4&amp; \\hfill 3\\end{array}\\right][\/latex]\r\n\r\n[reveal-answer q=\"644182\"]Solution[\/reveal-answer]\r\n[hidden-answer a=\"644182\"][latex]A+B=\\left[\\begin{array}{c}2\\\\ 1\\\\ 1\\end{array}\\begin{array}{c}6\\\\ \\text{ }\\text{ }\\text{ }0\\\\ -3\\end{array}\\right]+\\left[\\begin{array}{c}3\\\\ 1\\\\ -4\\end{array}\\begin{array}{c}-2\\\\ 5\\\\ 3\\end{array}\\right]=\\left[\\begin{array}{c}2+3\\\\ 1+1\\\\ 1+\\left(-4\\right)\\end{array}\\begin{array}{c}6+\\left(-2\\right)\\\\ 0+5\\\\ -3+3\\end{array}\\right]=\\left[\\begin{array}{c}5\\\\ 2\\\\ -3\\end{array}\\begin{array}{c}4\\\\ 5\\\\ 0\\end{array}\\right][\/latex][\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n[ohm_question hide_question_numbers=1]127219[\/ohm_question]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n[ohm_question hide_question_numbers=1]127220[\/ohm_question]\r\n\r\n<\/div>\r\n<h2>Finding Scalar Multiples of a Matrix<\/h2>\r\nBesides 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 <strong>scalar<\/strong> is a real number quantity that has magnitude, but not direction. For example, time, temperature, and distance are scalar quantities. The process of <strong>scalar multiplication<\/strong> involves multiplying each entry in a matrix by a scalar. A <strong>scalar multiple<\/strong> is any entry of a matrix that results from scalar multiplication.\r\n\r\nConsider 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\u2019s current inventory is displayed in the table below.\r\n<table id=\"Table_09_05_02\" summary=\"..\">\r\n<thead>\r\n<tr>\r\n<th><\/th>\r\n<th>Lab A<\/th>\r\n<th>Lab B<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>Computers<\/strong><\/td>\r\n<td>15<\/td>\r\n<td>27<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Computer Tables<\/strong><\/td>\r\n<td>16<\/td>\r\n<td>34<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Chairs<\/strong><\/td>\r\n<td>16<\/td>\r\n<td>34<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nConverting the data to a matrix, we have\r\n<div style=\"text-align: center;\">[latex]{C}_{2013}=\\left[\\begin{array}{c}15\\\\ 16\\\\ 16\\end{array}\\begin{array}{c}27\\\\ 34\\\\ 34\\end{array}\\right][\/latex]<\/div>\r\nTo calculate how much computer equipment will be needed, we multiply all entries in matrix [latex]C[\/latex] by 0.15.\r\n<div style=\"text-align: center;\">[latex]\\left(0.15\\right){C}_{2013}=\\left[\\begin{array}{c}\\left(0.15\\right)15\\\\ \\left(0.15\\right)16\\\\ \\left(0.15\\right)16\\end{array}\\begin{array}{c}\\left(0.15\\right)27\\\\ \\left(0.15\\right)34\\\\ \\left(0.15\\right)34\\end{array}\\right]=\\left[\\begin{array}{c}2.25\\\\ 2.4\\\\ 2.4\\end{array}\\begin{array}{c}4.05\\\\ 5.1\\\\ 5.1\\end{array}\\right][\/latex]<\/div>\r\nWe must round up to the next integer, so the amount of new equipment needed is\r\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{c}3\\\\ 3\\\\ 3\\end{array}\\begin{array}{c}5\\\\ 6\\\\ 6\\end{array}\\right][\/latex]<\/div>\r\nAdding the two matrices as shown below, we see the new inventory amounts.\r\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{c}15\\\\ 16\\\\ 16\\end{array}\\begin{array}{c}27\\\\ 34\\\\ 34\\end{array}\\right]+\\left[\\begin{array}{c}3\\\\ 3\\\\ 3\\end{array}\\begin{array}{c}5\\\\ 6\\\\ 6\\end{array}\\right]=\\left[\\begin{array}{c}18\\\\ 19\\\\ 19\\end{array}\\begin{array}{c}32\\\\ 40\\\\ 40\\end{array}\\right][\/latex]<\/div>\r\nThis means\r\n<div style=\"text-align: center;\">[latex]{C}_{2014}=\\left[\\begin{array}{c}18\\\\ 19\\\\ 19\\end{array}\\begin{array}{c}32\\\\ 40\\\\ 40\\end{array}\\right][\/latex]<\/div>\r\nThus, Lab A will have 18 computers, 19 computer tables, and 19 chairs; Lab B will have 32 computers, 40 computer tables, and 40 chairs.\r\n<div class=\"textbox\">\r\n<h3>A General Note: Scalar Multiplication<\/h3>\r\nScalar multiplication involves finding the product of a constant by each entry in the matrix. Given\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cccc}{a}_{11}&amp; &amp; &amp; {a}_{12}\\\\ {a}_{21}&amp; &amp; &amp; {a}_{22}\\end{array}\\right][\/latex]<\/p>\r\nthe scalar multiple [latex]cA[\/latex] is\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}cA=c\\left[\\begin{array}{ccc}{a}_{11}&amp; &amp; {a}_{12}\\\\ {a}_{21}&amp; &amp; {a}_{22}\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{ccc}c{a}_{11}&amp; &amp; c{a}_{12}\\\\ c{a}_{21}&amp; &amp; c{a}_{22}\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\r\nScalar multiplication is distributive. For the matrices [latex]A,B[\/latex], and [latex]C[\/latex] with scalars [latex]a[\/latex] and [latex]b[\/latex],\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\\\ \\begin{array}{c}a\\left(A+B\\right)=aA+aB\\\\ \\left(a+b\\right)A=aA+bA\\end{array}\\end{array}[\/latex]<\/p>\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Multiplying the Matrix by a Scalar<\/h3>\r\nMultiply matrix [latex]A[\/latex] by the scalar 3.\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}8&amp; 1\\\\ 5&amp; 4\\end{array}\\right][\/latex]<\/p>\r\n[reveal-answer q=\"90744\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"90744\"]\r\nMultiply each entry in [latex]A[\/latex] by the scalar 3.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}3A=3\\left[\\begin{array}{rr}\\hfill 8&amp; \\hfill 1\\\\ \\hfill 5&amp; \\hfill 4\\end{array}\\right]\\hfill \\\\ = \\left[\\begin{array}{rr}\\hfill 3\\cdot 8&amp; \\hfill 3\\cdot 1\\\\ \\hfill 3\\cdot 5&amp; \\hfill 3\\cdot 4\\end{array}\\right]\\hfill \\\\ = \\left[\\begin{array}{rr}\\hfill 24&amp; \\hfill 3\\\\ \\hfill 15&amp; \\hfill 12\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3>Try It<\/h3>\r\nGiven matrix [latex]B,\\text{}[\/latex] find [latex]-2B[\/latex] where\r\n<p style=\"text-align: center;\">[latex]B=\\left[\\begin{array}{cc}4&amp; 1\\\\ 3&amp; 2\\end{array}\\right][\/latex]<\/p>\r\n[reveal-answer q=\"2999\"]Solution[\/reveal-answer]\r\n[hidden-answer a=\"2999\"][latex]-2B=\\left[\\begin{array}{cc}-8&amp; -2\\\\ -6&amp; -4\\end{array}\\right][\/latex][\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Finding the Sum of Scalar Multiples<\/h3>\r\nFind the sum [latex]3A+2B[\/latex].\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrr}\\hfill 1&amp; \\hfill -2&amp; \\hfill 0\\\\ \\hfill 0&amp; \\hfill -1&amp; \\hfill 2\\\\ \\hfill 4&amp; \\hfill 3&amp; \\hfill -6\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{rrr}\\hfill -1&amp; \\hfill 2&amp; \\hfill 1\\\\ \\hfill 0&amp; \\hfill -3&amp; \\hfill 2\\\\ \\hfill 0&amp; \\hfill 1&amp; \\hfill -4\\end{array}\\right][\/latex]<\/p>\r\n[reveal-answer q=\"755068\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"755068\"]\r\n\r\nFirst, find [latex]3A,\\text{}[\/latex] then [latex]2B[\/latex].\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\begin{array}{l}\\hfill \\\\ \\hfill \\\\ 3A=\\left[\\begin{array}{lll}3\\cdot 1\\hfill &amp; 3\\left(-2\\right)\\hfill &amp; 3\\cdot 0\\hfill \\\\ 3\\cdot 0\\hfill &amp; 3\\left(-1\\right)\\hfill &amp; 3\\cdot 2\\hfill \\\\ 3\\cdot 4\\hfill &amp; 3\\cdot 3\\hfill &amp; 3\\left(-6\\right)\\hfill \\end{array}\\right]\\hfill \\end{array}\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill 3&amp; \\hfill -6&amp; \\hfill 0\\\\ \\hfill 0&amp; \\hfill -3&amp; \\hfill 6\\\\ \\hfill 12&amp; \\hfill 9&amp; \\hfill -18\\end{array}\\right]\\hfill \\end{array}[\/latex]\r\n[latex]\\begin{array}{l}\\begin{array}{l}\\hfill \\\\ \\hfill \\\\ 2B=\\left[\\begin{array}{lll}2\\left(-1\\right)\\hfill &amp; 2\\cdot 2\\hfill &amp; 2\\cdot 1\\hfill \\\\ 2\\cdot 0\\hfill &amp; 2\\left(-3\\right)\\hfill &amp; 2\\cdot 2\\hfill \\\\ 2\\cdot 0\\hfill &amp; 2\\cdot 1\\hfill &amp; 2\\left(-4\\right)\\hfill \\end{array}\\right]\\hfill \\end{array}\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill -2&amp; \\hfill 4&amp; \\hfill 2\\\\ \\hfill 0&amp; \\hfill -6&amp; \\hfill 4\\\\ \\hfill 0&amp; \\hfill 2&amp; \\hfill -8\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\r\nNow, add [latex]3A+2B[\/latex].\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ \\hfill \\\\ 3A+2B=\\left[\\begin{array}{rrr}\\hfill 3&amp; \\hfill -6&amp; \\hfill 0\\\\ \\hfill 0&amp; \\hfill -3&amp; \\hfill 6\\\\ \\hfill 12&amp; \\hfill 9&amp; \\hfill -18\\end{array}\\right]+\\left[\\begin{array}{rrr}\\hfill -2&amp; \\hfill 4&amp; \\hfill 2\\\\ \\hfill 0&amp; \\hfill -6&amp; \\hfill 4\\\\ \\hfill 0&amp; \\hfill 2&amp; \\hfill -8\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill 3 - 2&amp; \\hfill -6+4&amp; \\hfill 0+2\\\\ \\hfill 0+0&amp; \\hfill -3 - 6&amp; \\hfill 6+4\\\\ \\hfill 12+0&amp; \\hfill 9+2&amp; \\hfill -18 - 8\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill 1&amp; \\hfill -2&amp; \\hfill 2\\\\ \\hfill 0&amp; \\hfill -9&amp; \\hfill 10\\\\ \\hfill 12&amp; \\hfill 11&amp; \\hfill -26\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n[ohm_question hide_question_numbers=1]127222[\/ohm_question]\r\n\r\n<\/div>\r\n<h2>Finding the Product of Two Matrices<\/h2>\r\nIn addition to multiplying a matrix by a scalar, we can multiply two matrices. Finding the <strong>product of two matrices<\/strong> 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 [latex]A[\/latex] is an [latex]\\text{ }m\\text{ }\\times \\text{ }r\\text{ }[\/latex] matrix and [latex]B[\/latex] is an [latex]\\text{ }r\\text{ }\\times \\text{ }n\\text{ }[\/latex] matrix, then the product matrix [latex]AB[\/latex] is an [latex]\\text{ }m\\text{ }\\times \\text{ }n\\text{ }[\/latex] matrix. For example, the product [latex]AB[\/latex] is possible because the number of columns in [latex]A[\/latex] is the same as the number of rows in [latex]B[\/latex]. If the inner dimensions do not match, the product is not defined.\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"154\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27181423\/12.jpg\" alt=\"A has two rows and three columns and B has three rows and three columns. Because the number of columns in A matches the number of rows in B, the product of A and B is defined.\" width=\"154\" height=\"93\" \/> <b>Figure 1<\/b>[\/caption]\r\n\r\nWe multiply entries of [latex]A[\/latex] with entries of [latex]B[\/latex] according to a specific pattern as outlined below. The process of <strong>matrix multiplication<\/strong> becomes clearer when working a problem with real numbers.\r\n\r\nTo obtain the entries in row [latex]i[\/latex] of [latex]AB,\\text{}[\/latex] we multiply the entries in row [latex]i[\/latex] of [latex]A[\/latex] by column [latex]j[\/latex] in [latex]B[\/latex] and add. For example, given matrices [latex]A[\/latex] and [latex]B,\\text{}[\/latex] where the dimensions of [latex]A[\/latex] are [latex]2\\text{ }\\times \\text{ }3[\/latex] and the dimensions of [latex]B[\/latex] are [latex]3\\text{ }\\times \\text{ }3,\\text{}[\/latex] the product of [latex]AB[\/latex] will be a [latex]2\\text{ }\\times \\text{ }3[\/latex] matrix.\r\n<div style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrr}\\hfill {a}_{11}&amp; \\hfill {a}_{12}&amp; \\hfill {a}_{13}\\\\ \\hfill {a}_{21}&amp; \\hfill {a}_{22}&amp; \\hfill {a}_{23}\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{rrr}\\hfill {b}_{11}&amp; \\hfill {b}_{12}&amp; \\hfill {b}_{13}\\\\ \\hfill {b}_{21}&amp; \\hfill {b}_{22}&amp; \\hfill {b}_{23}\\\\ \\hfill {b}_{31}&amp; \\hfill {b}_{32}&amp; \\hfill {b}_{33}\\end{array}\\right][\/latex]<\/div>\r\nMultiply and add as follows to obtain the first entry of the product matrix [latex]AB[\/latex].\r\n<ol>\r\n \t<li>To obtain the entry in row 1, column 1 of [latex]AB,\\text{}[\/latex] multiply the first row in [latex]A[\/latex] by the first column in [latex]B[\/latex], and add.\r\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{ccc}{a}_{11}&amp; {a}_{12}&amp; {a}_{13}\\end{array}\\right]\\cdot \\left[\\begin{array}{c}{b}_{11}\\\\ {b}_{21}\\\\ {b}_{31}\\end{array}\\right]={a}_{11}\\cdot {b}_{11}+{a}_{12}\\cdot {b}_{21}+{a}_{13}\\cdot {b}_{31}[\/latex]<\/div><\/li>\r\n \t<li>To obtain the entry in row 1, column 2 of [latex]AB,\\text{}[\/latex] multiply the first row of [latex]A[\/latex] by the second column in [latex]B[\/latex], and add.\r\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{ccc}{a}_{11}&amp; {a}_{12}&amp; {a}_{13}\\end{array}\\right]\\cdot \\left[\\begin{array}{c}{b}_{12}\\\\ {b}_{22}\\\\ {b}_{32}\\end{array}\\right]={a}_{11}\\cdot {b}_{12}+{a}_{12}\\cdot {b}_{22}+{a}_{13}\\cdot {b}_{32}[\/latex]<\/div><\/li>\r\n \t<li>To obtain the entry in row 1, column 3 of [latex]AB,\\text{}[\/latex] multiply the first row of [latex]A[\/latex] by the third column in [latex]B[\/latex], and add.\r\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{ccc}{a}_{11}&amp; {a}_{12}&amp; {a}_{13}\\end{array}\\right]\\cdot \\left[\\begin{array}{c}{b}_{13}\\\\ {b}_{23}\\\\ {b}_{33}\\end{array}\\right]={a}_{11}\\cdot {b}_{13}+{a}_{12}\\cdot {b}_{23}+{a}_{13}\\cdot {b}_{33}[\/latex]<\/div><\/li>\r\n<\/ol>\r\nWe proceed the same way to obtain the second row of [latex]AB[\/latex]. In other words, row 2 of [latex]A[\/latex] times column 1 of [latex]B[\/latex]; row 2 of [latex]A[\/latex] times column 2 of [latex]B[\/latex]; row 2 of [latex]A[\/latex] times column 3 of [latex]B[\/latex]. When complete, the product matrix will be\r\n<div style=\"text-align: center;\">[latex]AB=\\left[\\begin{array}{c}\\begin{array}{l}{a}_{11}\\cdot {b}_{11}+{a}_{12}\\cdot {b}_{21}+{a}_{13}\\cdot {b}_{31}\\\\ \\end{array}\\\\ {a}_{21}\\cdot {b}_{11}+{a}_{22}\\cdot {b}_{21}+{a}_{23}\\cdot {b}_{31}\\end{array}\\begin{array}{c}\\begin{array}{l}{a}_{11}\\cdot {b}_{12}+{a}_{12}\\cdot {b}_{22}+{a}_{13}\\cdot {b}_{32}\\\\ \\end{array}\\\\ {a}_{21}\\cdot {b}_{12}+{a}_{22}\\cdot {b}_{22}+{a}_{23}\\cdot {b}_{32}\\end{array}\\begin{array}{c}\\begin{array}{l}{a}_{11}\\cdot {b}_{13}+{a}_{12}\\cdot {b}_{23}+{a}_{13}\\cdot {b}_{33}\\\\ \\end{array}\\\\ {a}_{21}\\cdot {b}_{13}+{a}_{22}\\cdot {b}_{23}+{a}_{23}\\cdot {b}_{33}\\end{array}\\right][\/latex]<\/div>\r\n<div class=\"textbox\">\r\n<h3>A General Note: Properties of Matrix Multiplication<\/h3>\r\nFor the matrices [latex]A,B,\\text{}[\/latex] and [latex]C[\/latex] the following properties hold.\r\n<ul>\r\n \t<li>Matrix multiplication is associative:\r\n<div style=\"text-align: center;\">[latex]\\left(AB\\right)C=A\\left(BC\\right)[\/latex]<\/div><\/li>\r\n \t<li>Matrix multiplication is distributive:\r\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\begin{array}{l}\\\\ C\\left(A+B\\right)=CA+CB,\\end{array}\\hfill \\\\ \\left(A+B\\right)C=AC+BC.\\hfill \\end{array}[\/latex]<\/div><\/li>\r\n<\/ul>\r\nNote that matrix multiplication is not commutative.\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Multiplying Two Matrices<\/h3>\r\nMultiply matrix [latex]A[\/latex] and matrix [latex]B[\/latex].\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}1&amp; 2\\\\ 3&amp; 4\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{cc}5&amp; 6\\\\ 7&amp; 8\\end{array}\\right][\/latex]<\/p>\r\n[reveal-answer q=\"843176\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"843176\"]\r\n\r\nFirst, we check the dimensions of the matrices. Matrix [latex]A[\/latex] has dimensions [latex]2\\times 2[\/latex] and matrix [latex]B[\/latex] has dimensions [latex]2\\times 2[\/latex]. The inner dimensions are the same so we can perform the multiplication. The product will have the dimensions [latex]2\\times 2[\/latex].\r\n\r\nWe perform the operations outlined previously.\r\n\r\n<img class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/11\/03193520\/CNX_Precalc_Figure_09_05_0032.jpg\" alt=\"The first column of the product of A and B is defined as the result of matrix -vector multiplication of A and the first column of B. Column two of the product of A and B is defined as the result of the matrix-vector multiplication of A and the second column of B.\" width=\"487\" height=\"211\" \/>\r\n\r\n[\/hidden-answer]<b><\/b>\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Multiplying Two Matrices<\/h3>\r\nGiven [latex]A[\/latex] and [latex]B:[\/latex]\r\n<ol>\r\n \t<li>Find [latex]AB[\/latex].<\/li>\r\n \t<li>Find [latex]BA[\/latex].<\/li>\r\n<\/ol>\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{l}\\begin{array}{ccc}-1&amp; 2&amp; 3\\end{array}\\hfill \\\\ \\begin{array}{ccc}4&amp; 0&amp; 5\\end{array}\\hfill \\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{c}5\\\\ -4\\\\ 2\\end{array}\\begin{array}{c}-1\\\\ 0\\\\ 3\\end{array}\\right][\/latex]<\/p>\r\n[reveal-answer q=\"403957\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"403957\"]\r\n<ol>\r\n \t<li>As the dimensions of [latex]A[\/latex] are [latex]2\\text{}\\times \\text{}3[\/latex] and the dimensions of [latex]B[\/latex] are [latex]3\\text{}\\times \\text{}2,\\text{}[\/latex] these matrices can be multiplied together because the number of columns in [latex]A[\/latex] matches the number of rows in [latex]B[\/latex]. The resulting product will be a [latex]2\\text{}\\times \\text{}2[\/latex] matrix, the number of rows in [latex]A[\/latex] by the number of columns in [latex]B[\/latex].\r\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ AB=\\left[\\begin{array}{rrr}\\hfill -1&amp; \\hfill 2&amp; \\hfill 3\\\\ \\hfill 4&amp; \\hfill 0&amp; \\hfill 5\\end{array}\\right]\\text{ }\\left[\\begin{array}{rr}\\hfill 5&amp; \\hfill -1\\\\ \\hfill -4&amp; \\hfill 0\\\\ \\hfill 2&amp; \\hfill 3\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rr}\\hfill -1\\left(5\\right)+2\\left(-4\\right)+3\\left(2\\right)&amp; \\hfill -1\\left(-1\\right)+2\\left(0\\right)+3\\left(3\\right)\\\\ \\hfill 4\\left(5\\right)+0\\left(-4\\right)+5\\left(2\\right)&amp; \\hfill 4\\left(-1\\right)+0\\left(0\\right)+5\\left(3\\right)\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rr}\\hfill -7&amp; \\hfill 10\\\\ \\hfill 30&amp; \\hfill 11\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/div><\/li>\r\n \t<li>The dimensions of [latex]B[\/latex] are [latex]3\\times 2[\/latex] and the dimensions of [latex]A[\/latex] are [latex]2\\times 3[\/latex]. The inner dimensions match so the product is defined and will be a [latex]3\\times 3[\/latex] matrix.\r\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ BA=\\left[\\begin{array}{rr}\\hfill 5&amp; \\hfill -1\\\\ \\hfill -4&amp; \\hfill 0\\\\ \\hfill 2&amp; \\hfill 3\\end{array}\\right]\\text{ }\\left[\\begin{array}{rrr}\\hfill -1&amp; \\hfill 2&amp; \\hfill 3\\\\ \\hfill 4&amp; \\hfill 0&amp; \\hfill 5\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill 5\\left(-1\\right)+-1\\left(4\\right)&amp; \\hfill 5\\left(2\\right)+-1\\left(0\\right)&amp; \\hfill 5\\left(3\\right)+-1\\left(5\\right)\\\\ \\hfill -4\\left(-1\\right)+0\\left(4\\right)&amp; \\hfill -4\\left(2\\right)+0\\left(0\\right)&amp; \\hfill -4\\left(3\\right)+0\\left(5\\right)\\\\ \\hfill 2\\left(-1\\right)+3\\left(4\\right)&amp; \\hfill 2\\left(2\\right)+3\\left(0\\right)&amp; \\hfill 2\\left(3\\right)+3\\left(5\\right)\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill -9&amp; \\hfill 10&amp; \\hfill 10\\\\ \\hfill 4&amp; \\hfill -8&amp; \\hfill -12\\\\ \\hfill 10&amp; \\hfill 4&amp; \\hfill 21\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/div><\/li>\r\n<\/ol>\r\n<h4>Analysis of the Solution<\/h4>\r\nNotice that the products [latex]AB[\/latex] and [latex]BA[\/latex] are not equal.\r\n<p style=\"text-align: center;\">[latex]AB=\\left[\\begin{array}{cc}-7&amp; 10\\\\ 30&amp; 11\\end{array}\\right]\\ne \\left[\\begin{array}{ccc}-9&amp; 10&amp; 10\\\\ 4&amp; -8&amp; -12\\\\ 10&amp; 4&amp; 21\\end{array}\\right]=BA[\/latex]<\/p>\r\nThis illustrates the fact that matrix multiplication is not commutative.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n[ohm_question hide_question_numbers=1]127225[\/ohm_question]\r\n\r\n<\/div>\r\n<div class=\"textbox\">\r\n<h3>Q &amp; A<\/h3>\r\n<h3>Is it possible for <em>AB<\/em> to be defined but not <em>BA<\/em>?<\/h3>\r\n<em>Yes, consider a matrix A with dimension [latex]3\\times 4[\/latex] and matrix B with dimension [latex]4\\times 2[\/latex]. 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.<\/em>\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Using Matrices in Real-World Problems<\/h3>\r\nLet\u2019s return to the problem presented at the opening of this section. We have the table below, representing the equipment needs of two soccer teams.\r\n<table summary=\"..\">\r\n<thead>\r\n<tr>\r\n<th><\/th>\r\n<th>Wildcats<\/th>\r\n<th>Mud Cats<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>Goals<\/strong><\/td>\r\n<td>6<\/td>\r\n<td>10<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Balls<\/strong><\/td>\r\n<td>30<\/td>\r\n<td>24<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Jerseys<\/strong><\/td>\r\n<td>14<\/td>\r\n<td>20<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nWe are also given the prices of the equipment, as shown in the table below.\r\n<table summary=\"..\">\r\n<tbody>\r\n<tr>\r\n<td><strong>Goal<\/strong><\/td>\r\n<td>$300<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Ball<\/strong><\/td>\r\n<td>$10<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Jersey<\/strong><\/td>\r\n<td>$30<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nWe will convert the data to matrices. Thus, the equipment need matrix is written as\r\n<p style=\"text-align: center;\">[latex]E=\\left[\\begin{array}{c}6\\\\ 30\\\\ 14\\end{array}\\begin{array}{c}10\\\\ 24\\\\ 20\\end{array}\\right][\/latex]<\/p>\r\nThe cost matrix is written as\r\n<p style=\"text-align: center;\">[latex]C=\\left[\\begin{array}{ccc}300&amp; 10&amp; 30\\end{array}\\right][\/latex]\r\nWe perform matrix multiplication to obtain costs for the equipment.\r\n[latex]\\begin{array}{l}\\hfill \\\\ \\hfill \\\\ CE=\\left[\\begin{array}{rrr}\\hfill 300&amp; \\hfill 10&amp; \\hfill 30\\end{array}\\right]\\cdot \\left[\\begin{array}{rr}\\hfill 6&amp; \\hfill 10\\\\ \\hfill 30&amp; \\hfill 24\\\\ \\hfill 14&amp; \\hfill 20\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rr}\\hfill 300\\left(6\\right)+10\\left(30\\right)+30\\left(14\\right)&amp; \\hfill 300\\left(10\\right)+10\\left(24\\right)+30\\left(20\\right)\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rr}\\hfill 2,520&amp; \\hfill 3,840\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\r\nThe total cost for equipment for the Wildcats is $2,520, and the total cost for equipment for the Mud Cats is $3,840.\r\n\r\n<\/div>\r\n<div class=\"textbox\">\r\n<h3>How To: Given a matrix operation, evaluate using a calculator.<strong>\r\n<\/strong><\/h3>\r\n<ol>\r\n \t<li>Save each matrix as a matrix variable [latex]\\left[A\\right],\\left[B\\right],\\left[C\\right],..[\/latex].<\/li>\r\n \t<li>Enter the operation into the calculator, calling up each matrix variable as needed.<\/li>\r\n \t<li>If the operation is defined, the calculator will present the solution matrix; if the operation is undefined, it will display an error message.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example: Using a Calculator to Perform Matrix Operations<\/h3>\r\nFind [latex]AB-C[\/latex]\u00a0given\r\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrr}\\hfill -15&amp; \\hfill 25&amp; \\hfill 32\\\\ \\hfill 41&amp; \\hfill -7&amp; \\hfill -28\\\\ \\hfill 10&amp; \\hfill 34&amp; \\hfill -2\\end{array}\\right],B=\\left[\\begin{array}{rrr}\\hfill 45&amp; \\hfill 21&amp; \\hfill -37\\\\ \\hfill -24&amp; \\hfill 52&amp; \\hfill 19\\\\ \\hfill 6&amp; \\hfill -48&amp; \\hfill -31\\end{array}\\right],\\text{and }C=\\left[\\begin{array}{rrr}\\hfill -100&amp; \\hfill -89&amp; \\hfill -98\\\\ \\hfill 25&amp; \\hfill -56&amp; \\hfill 74\\\\ \\hfill -67&amp; \\hfill 42&amp; \\hfill -75\\end{array}\\right][\/latex].<\/p>\r\n[reveal-answer q=\"32907\"]Solution[\/reveal-answer]\r\n[hidden-answer a=\"32907\"]\r\n\r\nOn the matrix page of the calculator, we enter matrix [latex]A[\/latex] above as the matrix variable [latex]\\left[A\\right][\/latex], matrix [latex]B[\/latex] above as the matrix variable [latex]\\left[B\\right][\/latex], and matrix [latex]C[\/latex] above as the matrix variable [latex]\\left[C\\right][\/latex].\r\n\r\nOn the home screen of the calculator, we type in the problem and call up each matrix variable as needed.\r\n<p style=\"text-align: center;\">[latex]\\left[A\\right]\\times \\left[B\\right]-\\left[C\\right][\/latex]\r\nThe calculator gives us the following matrix.\r\n[latex]\\left[\\begin{array}{rrr}\\hfill -983&amp; \\hfill -462&amp; \\hfill 136\\\\ \\hfill 1,820&amp; \\hfill 1,897&amp; \\hfill -856\\\\ \\hfill -311&amp; \\hfill 2,032&amp; \\hfill 413\\end{array}\\right][\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<h2>Key Concepts<\/h2>\r\n<ul>\r\n \t<li>A matrix is a rectangular array of numbers. Entries are arranged in rows and columns.<\/li>\r\n \t<li>The dimensions of a matrix refer to the number of rows and the number of columns. A [latex]3\\times 2[\/latex] matrix has three rows and two columns.<\/li>\r\n \t<li>We add and subtract matrices of equal dimensions by adding and subtracting corresponding entries of each matrix.<\/li>\r\n \t<li>Scalar multiplication involves multiplying each entry in a matrix by a constant.<\/li>\r\n \t<li>Scalar multiplication is often required before addition or subtraction can occur.<\/li>\r\n \t<li>Multiplying matrices is possible when inner dimensions are the same\u2014the number of columns in the first matrix must match the number of rows in the second.<\/li>\r\n \t<li>The product of two matrices, [latex]A[\/latex] and [latex]B[\/latex], is obtained by multiplying each entry in row 1 of [latex]A[\/latex] by each entry in column 1 of [latex]B[\/latex]; then multiply each entry of row 1 of [latex]A[\/latex] by each entry in columns 2 of [latex]B,\\text{}[\/latex] and so on.<\/li>\r\n \t<li>Many real-world problems can often be solved using matrices.<\/li>\r\n \t<li>We can use a calculator to perform matrix operations after saving each matrix as a matrix variable.<\/li>\r\n<\/ul>\r\n<h2>Glossary<\/h2>\r\n<dl id=\"fs-id1165134073074\" class=\"definition\">\r\n \t<dt>column<\/dt>\r\n \t<dd id=\"fs-id1165134073079\">a set of numbers aligned vertically in a matrix<\/dd>\r\n<\/dl>\r\n<dl id=\"fs-id1165135639171\" class=\"definition\">\r\n \t<dt>entry<\/dt>\r\n \t<dd id=\"fs-id1165135639177\">an element, coefficient, or constant in a matrix<\/dd>\r\n<\/dl>\r\n<dl id=\"fs-id1165135639180\" class=\"definition\">\r\n \t<dt>matrix<\/dt>\r\n \t<dd id=\"fs-id1165137937501\">a rectangular array of numbers<\/dd>\r\n<\/dl>\r\n<dl id=\"fs-id1165134033250\" class=\"definition\">\r\n \t<dt>row<\/dt>\r\n \t<dd id=\"fs-id1165137937510\">a set of numbers aligned horizontally in a matrix<\/dd>\r\n<\/dl>\r\n<dl id=\"fs-id1165135199312\" class=\"definition\">\r\n \t<dt>scalar multiple<\/dt>\r\n \t<dd id=\"fs-id1165135199316\">an entry of a matrix that has been multiplied by a scalar<\/dd>\r\n<\/dl>","rendered":"<div class=\"bcc-box bcc-highlight\">\n<h3>Learning Outcomes<\/h3>\n<p>By the end of this section, you will be able to:<\/p>\n<ul>\n<li>Find the sum and difference of two matrices.<\/li>\n<li>Find scalar multiples of a matrix.<\/li>\n<li>Find the product of two matrices.<\/li>\n<\/ul>\n<\/div>\n<div style=\"width: 498px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27181421\/CNX_Precalc_Figure_09_05_001n2.jpg\" alt=\"Two teams playing soccer.\" width=\"488\" height=\"493\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 1.<\/b> (credit: &#8220;SD Dirk,&#8221; Flickr)<\/p>\n<\/div>\n<p>Two club soccer teams, the Wildcats and the Mud Cats, are hoping to obtain new equipment for an upcoming season. <a class=\"autogenerated-content\" href=\"#Table_09_05_01\">[link]<\/a> shows the needs of both teams.<\/p>\n<table id=\"Table_09_05_01\" summary=\"..\">\n<thead>\n<tr>\n<th><\/th>\n<th>Wildcats<\/th>\n<th>Mud Cats<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Goals<\/strong><\/td>\n<td>6<\/td>\n<td>10<\/td>\n<\/tr>\n<tr>\n<td><strong>Balls<\/strong><\/td>\n<td>30<\/td>\n<td>24<\/td>\n<\/tr>\n<tr>\n<td><strong>Jerseys<\/strong><\/td>\n<td>14<\/td>\n<td>20<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>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.<\/p>\n<h2>Finding the Sum and Difference of Two Matrices<\/h2>\n<p>To solve a problem like the one described for the soccer teams, we can use a <strong>matrix<\/strong>, which is a rectangular array of numbers. A <strong>row<\/strong> in a matrix is a set of numbers that are aligned horizontally. A <strong>column<\/strong> in a matrix is a set of numbers that are aligned vertically. Each number is an <strong>entry<\/strong>, 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 [latex]A,B,\\text{}[\/latex] and [latex]C[\/latex] are shown below.<\/p>\n<div style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}1& 2\\\\ 3& 4\\end{array}\\right],B=\\left[\\begin{array}{ccc}1& 2& 7\\\\ 0& -5& 6\\\\ 7& 8& 2\\end{array}\\right],C=\\left[\\begin{array}{c}-1\\\\ 0\\\\ 3\\end{array}\\begin{array}{c}3\\\\ 2\\\\ 1\\end{array}\\right][\/latex]<\/div>\n<h2>Describing Matrices<\/h2>\n<p>A matrix is often referred to by its size or dimensions: [latex]\\text{ }m\\text{ }\\times \\text{ }n\\text{ }[\/latex] indicating [latex]m[\/latex] rows and [latex]n[\/latex] columns. Matrix entries are defined first by row and then by column. For example, to locate the entry in matrix [latex]A[\/latex] identified as [latex]{a}_{ij},\\text{}[\/latex] we look for the entry in row [latex]i,\\text{}[\/latex] column [latex]j[\/latex]. In matrix [latex]A\\text{, \\hspace{0.17em}}[\/latex] shown below, the entry in row 2, column 3 is [latex]{a}_{23}[\/latex].<\/p>\n<div style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\\\\ {a}_{21}& {a}_{22}& {a}_{23}\\\\ {a}_{31}& {a}_{32}& {a}_{33}\\end{array}\\right][\/latex]<\/div>\n<p>A <strong>square matrix<\/strong> is a matrix with dimensions [latex]\\text{ }n\\text{ }\\times \\text{ }n,\\text{}[\/latex] meaning that it has the same number of rows as columns. The [latex]3\\times 3[\/latex] matrix above is an example of a square matrix.<\/p>\n<p>A <strong>row matrix<\/strong> is a matrix consisting of one row with dimensions [latex]1\\text{ }\\times \\text{ }n[\/latex].<\/p>\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\\end{array}\\right][\/latex]<\/div>\n<p>A <strong>column matrix<\/strong> is a matrix consisting of one column with dimensions [latex]m\\text{ }\\times \\text{ }1[\/latex].<\/p>\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{c}{a}_{11}\\\\ {a}_{21}\\\\ {a}_{31}\\end{array}\\right][\/latex]<\/div>\n<p>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 <strong>matrix operations<\/strong>.<\/p>\n<div class=\"textbox\">\n<h3>A General Note: Matrices<\/h3>\n<p>A <strong>matrix<\/strong> is a rectangular array of numbers that is usually named by a capital letter: [latex]A,B,C,\\text{}[\/latex] and so on. Each entry in a matrix is referred to as [latex]{a}_{ij}[\/latex], such that [latex]i[\/latex] represents the row and [latex]j[\/latex] represents the column. Matrices are often referred to by their dimensions: [latex]m\\times n[\/latex] indicating [latex]m[\/latex] rows and [latex]n[\/latex] columns.<\/p>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Finding the Dimensions of the Given Matrix and Locating Entries<\/h3>\n<p>Given matrix [latex]A:[\/latex]<\/p>\n<ol>\n<li>What are the dimensions of matrix [latex]A?[\/latex]<\/li>\n<li>What are the entries at [latex]{a}_{31}[\/latex] and [latex]{a}_{22}?[\/latex]<\/li>\n<\/ol>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrrr} 2&& 1& 0\\\\ 2&& 4& 7\\\\ 3&& 1& -2\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q832047\">Show Solution<\/span><\/p>\n<div id=\"q832047\" class=\"hidden-answer\" style=\"display: none\">\n<ol>\n<li>The dimensions are [latex]\\text{ }3\\text{ }\\times \\text{ }3\\text{ }[\/latex] because there are three rows and three columns.<\/li>\n<li>Entry [latex]{a}_{31}[\/latex] is the number at row 3, column 1, which is 3. The entry [latex]{a}_{22}[\/latex] is the number at row 2, column 2, which is 4. Remember, the row comes first, then the column.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<h2>Adding and Subtracting Matrices<\/h2>\n<p>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.<\/p>\n<p>In order to do this, the entries must correspond. Therefore, <em>addition and subtraction of matrices is only possible when the matrices have the same dimensions<\/em>. We can add or subtract a [latex]\\text{ }3\\text{ }\\times \\text{ }3\\text{ }[\/latex] matrix and another [latex]\\text{ }3\\text{ }\\times \\text{ }3\\text{ }[\/latex] matrix, but we cannot add or subtract a [latex]\\text{ }2\\text{ }\\times \\text{ }3\\text{ }[\/latex] matrix and a [latex]\\text{ }3\\text{ }\\times \\text{ }3\\text{ }[\/latex] matrix because some entries in one matrix will not have a corresponding entry in the other matrix.<\/p>\n<div class=\"textbox\">\n<h3>A General Note: Adding and Subtracting Matrices<\/h3>\n<p>Given matrices [latex]A[\/latex] and [latex]B[\/latex] of like dimensions, addition and subtraction of [latex]A[\/latex] and [latex]B[\/latex] will produce matrix [latex]C[\/latex] or\u00a0matrix [latex]D[\/latex] of the same dimension.<\/p>\n<p style=\"text-align: center;\">[latex]A+B=C\\text{ such that }{a}_{ij}+{b}_{ij}={c}_{ij}[\/latex]<\/p>\n<p style=\"text-align: center;\">[latex]A-B=D\\text{ such that }{a}_{ij}-{b}_{ij}={d}_{ij}[\/latex]<\/p>\n<p>Matrix addition is commutative.<\/p>\n<p style=\"text-align: center;\">[latex]A+B=B+A[\/latex]<\/p>\n<p>It is also associative.<\/p>\n<p style=\"text-align: center;\">[latex]\\left(A+B\\right)+C=A+\\left(B+C\\right)[\/latex]<\/p>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Finding the Sum of Matrices<\/h3>\n<p>Find the sum of [latex]A[\/latex] and [latex]B,\\text{}[\/latex] given<\/p>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}a& b\\\\ c& d\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{cc}e& f\\\\ g& h\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q3634\">Show Solution<\/span><\/p>\n<div id=\"q3634\" class=\"hidden-answer\" style=\"display: none\">\nAdd corresponding entries.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}A+B=\\left[\\begin{array}{cc}a& b\\\\ c& d\\end{array}\\right]+\\left[\\begin{array}{cc}e& f\\\\ g& h\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{ccc}a+e& & b+f\\\\ c+g& & d+h\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Adding Matrix <em>A <\/em>and Matrix B<\/h3>\n<p>Find the sum of [latex]A[\/latex] and [latex]B[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}4& 1\\\\ 3& 2\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{cc}5& 9\\\\ 0& 7\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q512431\">Show Solution<\/span><\/p>\n<div id=\"q512431\" class=\"hidden-answer\" style=\"display: none\">\nAdd corresponding entries. Add the entry in row 1, column 1, [latex]{a}_{11},\\text{}[\/latex] of matrix [latex]A[\/latex] to the entry in row 1, column 1, [latex]{b}_{11}[\/latex], of [latex]B[\/latex]. Continue the pattern until all entries have been added.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}A+B=\\left[\\begin{array}{cc}4& 1\\\\ 3& 2\\end{array}\\right]+\\left[\\begin{array}{cc}5& 9\\\\ 0& 7\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{ccc}4+5& & 1+9\\\\ 3+0& & 2+7\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{cc}9& 10\\\\ 3& 9\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Finding the Difference of Two Matrices<\/h3>\n<p>Find the difference of [latex]A[\/latex] and [latex]B[\/latex].<br \/>\n[latex]A=\\left[\\begin{array}{cc}-2& 3\\\\ 0& 1\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{cc}8& 1\\\\ 5& 4\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q83802\">Show Solution<\/span><\/p>\n<div id=\"q83802\" class=\"hidden-answer\" style=\"display: none\">\n<p>We subtract the corresponding entries of each matrix.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}A-B=\\left[\\begin{array}{rr}\\hfill -2& \\hfill 3\\\\ \\hfill 0& \\hfill 1\\end{array}\\right]-\\left[\\begin{array}{rr}\\hfill 8& \\hfill 1\\\\ \\hfill 5& \\hfill 4\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill -2 - 8& \\hfill & \\hfill 3 - 1\\\\ \\hfill 0 - 5& \\hfill & \\hfill 1 - 4\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill -10& \\hfill & \\hfill 2\\\\ \\hfill -5& \\hfill & \\hfill -3\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Finding the Sum and Difference of Two 3 x 3 Matrices<\/h3>\n<p>Given [latex]A[\/latex] and [latex]B:[\/latex]<\/p>\n<ol>\n<li>Find the sum.<\/li>\n<li>Find the difference.<\/li>\n<\/ol>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrr}\\hfill 2& \\hfill -10& \\hfill -2\\\\ \\hfill 14& \\hfill 12& \\hfill 10\\\\ \\hfill 4& \\hfill -2& \\hfill 2\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{rrr}\\hfill 6& \\hfill 10& \\hfill -2\\\\ \\hfill 0& \\hfill -12& \\hfill -4\\\\ \\hfill -5& \\hfill 2& \\hfill -2\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q286263\">Show Solution<\/span><\/p>\n<div id=\"q286263\" class=\"hidden-answer\" style=\"display: none\">\n<ol>\n<li>Add the corresponding entries.\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ A+B=\\left[\\begin{array}{rrr}\\hfill 2& \\hfill -10& \\hfill -2\\\\ \\hfill 14& \\hfill 12& \\hfill 10\\\\ \\hfill 4& \\hfill -2& \\hfill 2\\end{array}\\right]+\\left[\\begin{array}{rrr}\\hfill 6& \\hfill 10& \\hfill -2\\\\ \\hfill 0& \\hfill -12& \\hfill -4\\\\ \\hfill -5& \\hfill 2& \\hfill -2\\end{array}\\right]\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill 2+6& \\hfill -10+10& \\hfill -2 - 2\\\\ \\hfill 14+0& \\hfill 12 - 12& \\hfill 10 - 4\\\\ \\hfill 4 - 5& \\hfill -2+2& \\hfill 2 - 2\\end{array}\\right]\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill 8& \\hfill 0& \\hfill -4\\\\ \\hfill 14& \\hfill 0& \\hfill 6\\\\ \\hfill -1& \\hfill 0& \\hfill 0\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/div>\n<\/li>\n<li>Subtract the corresponding entries.\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ A-B=\\left[\\begin{array}{rrr}\\hfill 2& \\hfill -10& \\hfill -2\\\\ \\hfill 14& \\hfill 12& \\hfill 10\\\\ \\hfill 4& \\hfill -2& \\hfill 2\\end{array}\\right]-\\left[\\begin{array}{rrr}\\hfill 6& \\hfill 10& \\hfill -2\\\\ \\hfill 0& \\hfill -12& \\hfill -4\\\\ \\hfill -5& \\hfill 2& \\hfill -2\\end{array}\\right]\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill 2 - 6& \\hfill -10 - 10& \\hfill -2+2\\\\ \\hfill 14 - 0& \\hfill 12+12& \\hfill 10+4\\\\ \\hfill 4+5& \\hfill -2 - 2& \\hfill 2+2\\end{array}\\right]\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill -4& \\hfill -20& \\hfill 0\\\\ \\hfill 14& \\hfill 24& \\hfill 14\\\\ \\hfill 9& \\hfill -4& \\hfill 4\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/div>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3>Try It<\/h3>\n<p>Add matrix [latex]A[\/latex] and matrix [latex]B[\/latex].<\/p>\n<p>[latex]A=\\left[\\begin{array}{rr}\\hfill 2& \\hfill 6\\\\ \\hfill 1& \\hfill 0\\\\ \\hfill 1& \\hfill -3\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{rr}\\hfill 3& \\hfill -2\\\\ \\hfill 1& \\hfill 5\\\\ \\hfill -4& \\hfill 3\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q644182\">Solution<\/span><\/p>\n<div id=\"q644182\" class=\"hidden-answer\" style=\"display: none\">[latex]A+B=\\left[\\begin{array}{c}2\\\\ 1\\\\ 1\\end{array}\\begin{array}{c}6\\\\ \\text{ }\\text{ }\\text{ }0\\\\ -3\\end{array}\\right]+\\left[\\begin{array}{c}3\\\\ 1\\\\ -4\\end{array}\\begin{array}{c}-2\\\\ 5\\\\ 3\\end{array}\\right]=\\left[\\begin{array}{c}2+3\\\\ 1+1\\\\ 1+\\left(-4\\right)\\end{array}\\begin{array}{c}6+\\left(-2\\right)\\\\ 0+5\\\\ -3+3\\end{array}\\right]=\\left[\\begin{array}{c}5\\\\ 2\\\\ -3\\end{array}\\begin{array}{c}4\\\\ 5\\\\ 0\\end{array}\\right][\/latex]<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm127219\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=127219&theme=oea&iframe_resize_id=ohm127219\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm127220\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=127220&theme=oea&iframe_resize_id=ohm127220\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<h2>Finding Scalar Multiples of a Matrix<\/h2>\n<p>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 <strong>scalar<\/strong> is a real number quantity that has magnitude, but not direction. For example, time, temperature, and distance are scalar quantities. The process of <strong>scalar multiplication<\/strong> involves multiplying each entry in a matrix by a scalar. A <strong>scalar multiple<\/strong> is any entry of a matrix that results from scalar multiplication.<\/p>\n<p>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\u2019s current inventory is displayed in the table below.<\/p>\n<table id=\"Table_09_05_02\" summary=\"..\">\n<thead>\n<tr>\n<th><\/th>\n<th>Lab A<\/th>\n<th>Lab B<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Computers<\/strong><\/td>\n<td>15<\/td>\n<td>27<\/td>\n<\/tr>\n<tr>\n<td><strong>Computer Tables<\/strong><\/td>\n<td>16<\/td>\n<td>34<\/td>\n<\/tr>\n<tr>\n<td><strong>Chairs<\/strong><\/td>\n<td>16<\/td>\n<td>34<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Converting the data to a matrix, we have<\/p>\n<div style=\"text-align: center;\">[latex]{C}_{2013}=\\left[\\begin{array}{c}15\\\\ 16\\\\ 16\\end{array}\\begin{array}{c}27\\\\ 34\\\\ 34\\end{array}\\right][\/latex]<\/div>\n<p>To calculate how much computer equipment will be needed, we multiply all entries in matrix [latex]C[\/latex] by 0.15.<\/p>\n<div style=\"text-align: center;\">[latex]\\left(0.15\\right){C}_{2013}=\\left[\\begin{array}{c}\\left(0.15\\right)15\\\\ \\left(0.15\\right)16\\\\ \\left(0.15\\right)16\\end{array}\\begin{array}{c}\\left(0.15\\right)27\\\\ \\left(0.15\\right)34\\\\ \\left(0.15\\right)34\\end{array}\\right]=\\left[\\begin{array}{c}2.25\\\\ 2.4\\\\ 2.4\\end{array}\\begin{array}{c}4.05\\\\ 5.1\\\\ 5.1\\end{array}\\right][\/latex]<\/div>\n<p>We must round up to the next integer, so the amount of new equipment needed is<\/p>\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{c}3\\\\ 3\\\\ 3\\end{array}\\begin{array}{c}5\\\\ 6\\\\ 6\\end{array}\\right][\/latex]<\/div>\n<p>Adding the two matrices as shown below, we see the new inventory amounts.<\/p>\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{c}15\\\\ 16\\\\ 16\\end{array}\\begin{array}{c}27\\\\ 34\\\\ 34\\end{array}\\right]+\\left[\\begin{array}{c}3\\\\ 3\\\\ 3\\end{array}\\begin{array}{c}5\\\\ 6\\\\ 6\\end{array}\\right]=\\left[\\begin{array}{c}18\\\\ 19\\\\ 19\\end{array}\\begin{array}{c}32\\\\ 40\\\\ 40\\end{array}\\right][\/latex]<\/div>\n<p>This means<\/p>\n<div style=\"text-align: center;\">[latex]{C}_{2014}=\\left[\\begin{array}{c}18\\\\ 19\\\\ 19\\end{array}\\begin{array}{c}32\\\\ 40\\\\ 40\\end{array}\\right][\/latex]<\/div>\n<p>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.<\/p>\n<div class=\"textbox\">\n<h3>A General Note: Scalar Multiplication<\/h3>\n<p>Scalar multiplication involves finding the product of a constant by each entry in the matrix. Given<\/p>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cccc}{a}_{11}& & & {a}_{12}\\\\ {a}_{21}& & & {a}_{22}\\end{array}\\right][\/latex]<\/p>\n<p>the scalar multiple [latex]cA[\/latex] is<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}cA=c\\left[\\begin{array}{ccc}{a}_{11}& & {a}_{12}\\\\ {a}_{21}& & {a}_{22}\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{ccc}c{a}_{11}& & c{a}_{12}\\\\ c{a}_{21}& & c{a}_{22}\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\n<p>Scalar multiplication is distributive. For the matrices [latex]A,B[\/latex], and [latex]C[\/latex] with scalars [latex]a[\/latex] and [latex]b[\/latex],<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\\\ \\begin{array}{c}a\\left(A+B\\right)=aA+aB\\\\ \\left(a+b\\right)A=aA+bA\\end{array}\\end{array}[\/latex]<\/p>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Multiplying the Matrix by a Scalar<\/h3>\n<p>Multiply matrix [latex]A[\/latex] by the scalar 3.<\/p>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}8& 1\\\\ 5& 4\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q90744\">Show Solution<\/span><\/p>\n<div id=\"q90744\" class=\"hidden-answer\" style=\"display: none\">\nMultiply each entry in [latex]A[\/latex] by the scalar 3.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}3A=3\\left[\\begin{array}{rr}\\hfill 8& \\hfill 1\\\\ \\hfill 5& \\hfill 4\\end{array}\\right]\\hfill \\\\ = \\left[\\begin{array}{rr}\\hfill 3\\cdot 8& \\hfill 3\\cdot 1\\\\ \\hfill 3\\cdot 5& \\hfill 3\\cdot 4\\end{array}\\right]\\hfill \\\\ = \\left[\\begin{array}{rr}\\hfill 24& \\hfill 3\\\\ \\hfill 15& \\hfill 12\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3>Try It<\/h3>\n<p>Given matrix [latex]B,\\text{}[\/latex] find [latex]-2B[\/latex] where<\/p>\n<p style=\"text-align: center;\">[latex]B=\\left[\\begin{array}{cc}4& 1\\\\ 3& 2\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q2999\">Solution<\/span><\/p>\n<div id=\"q2999\" class=\"hidden-answer\" style=\"display: none\">[latex]-2B=\\left[\\begin{array}{cc}-8& -2\\\\ -6& -4\\end{array}\\right][\/latex]<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Finding the Sum of Scalar Multiples<\/h3>\n<p>Find the sum [latex]3A+2B[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrr}\\hfill 1& \\hfill -2& \\hfill 0\\\\ \\hfill 0& \\hfill -1& \\hfill 2\\\\ \\hfill 4& \\hfill 3& \\hfill -6\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{rrr}\\hfill -1& \\hfill 2& \\hfill 1\\\\ \\hfill 0& \\hfill -3& \\hfill 2\\\\ \\hfill 0& \\hfill 1& \\hfill -4\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q755068\">Show Solution<\/span><\/p>\n<div id=\"q755068\" class=\"hidden-answer\" style=\"display: none\">\n<p>First, find [latex]3A,\\text{}[\/latex] then [latex]2B[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\begin{array}{l}\\hfill \\\\ \\hfill \\\\ 3A=\\left[\\begin{array}{lll}3\\cdot 1\\hfill & 3\\left(-2\\right)\\hfill & 3\\cdot 0\\hfill \\\\ 3\\cdot 0\\hfill & 3\\left(-1\\right)\\hfill & 3\\cdot 2\\hfill \\\\ 3\\cdot 4\\hfill & 3\\cdot 3\\hfill & 3\\left(-6\\right)\\hfill \\end{array}\\right]\\hfill \\end{array}\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill 3& \\hfill -6& \\hfill 0\\\\ \\hfill 0& \\hfill -3& \\hfill 6\\\\ \\hfill 12& \\hfill 9& \\hfill -18\\end{array}\\right]\\hfill \\end{array}[\/latex]<br \/>\n[latex]\\begin{array}{l}\\begin{array}{l}\\hfill \\\\ \\hfill \\\\ 2B=\\left[\\begin{array}{lll}2\\left(-1\\right)\\hfill & 2\\cdot 2\\hfill & 2\\cdot 1\\hfill \\\\ 2\\cdot 0\\hfill & 2\\left(-3\\right)\\hfill & 2\\cdot 2\\hfill \\\\ 2\\cdot 0\\hfill & 2\\cdot 1\\hfill & 2\\left(-4\\right)\\hfill \\end{array}\\right]\\hfill \\end{array}\\hfill \\\\ =\\left[\\begin{array}{rrr}\\hfill -2& \\hfill 4& \\hfill 2\\\\ \\hfill 0& \\hfill -6& \\hfill 4\\\\ \\hfill 0& \\hfill 2& \\hfill -8\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\n<p>Now, add [latex]3A+2B[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ \\hfill \\\\ 3A+2B=\\left[\\begin{array}{rrr}\\hfill 3& \\hfill -6& \\hfill 0\\\\ \\hfill 0& \\hfill -3& \\hfill 6\\\\ \\hfill 12& \\hfill 9& \\hfill -18\\end{array}\\right]+\\left[\\begin{array}{rrr}\\hfill -2& \\hfill 4& \\hfill 2\\\\ \\hfill 0& \\hfill -6& \\hfill 4\\\\ \\hfill 0& \\hfill 2& \\hfill -8\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill 3 - 2& \\hfill -6+4& \\hfill 0+2\\\\ \\hfill 0+0& \\hfill -3 - 6& \\hfill 6+4\\\\ \\hfill 12+0& \\hfill 9+2& \\hfill -18 - 8\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill 1& \\hfill -2& \\hfill 2\\\\ \\hfill 0& \\hfill -9& \\hfill 10\\\\ \\hfill 12& \\hfill 11& \\hfill -26\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm127222\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=127222&theme=oea&iframe_resize_id=ohm127222\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<h2>Finding the Product of Two Matrices<\/h2>\n<p>In addition to multiplying a matrix by a scalar, we can multiply two matrices. Finding the <strong>product of two matrices<\/strong> 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 [latex]A[\/latex] is an [latex]\\text{ }m\\text{ }\\times \\text{ }r\\text{ }[\/latex] matrix and [latex]B[\/latex] is an [latex]\\text{ }r\\text{ }\\times \\text{ }n\\text{ }[\/latex] matrix, then the product matrix [latex]AB[\/latex] is an [latex]\\text{ }m\\text{ }\\times \\text{ }n\\text{ }[\/latex] matrix. For example, the product [latex]AB[\/latex] is possible because the number of columns in [latex]A[\/latex] is the same as the number of rows in [latex]B[\/latex]. If the inner dimensions do not match, the product is not defined.<\/p>\n<div style=\"width: 164px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/3675\/2018\/09\/27181423\/12.jpg\" alt=\"A has two rows and three columns and B has three rows and three columns. Because the number of columns in A matches the number of rows in B, the product of A and B is defined.\" width=\"154\" height=\"93\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 1<\/b><\/p>\n<\/div>\n<p>We multiply entries of [latex]A[\/latex] with entries of [latex]B[\/latex] according to a specific pattern as outlined below. The process of <strong>matrix multiplication<\/strong> becomes clearer when working a problem with real numbers.<\/p>\n<p>To obtain the entries in row [latex]i[\/latex] of [latex]AB,\\text{}[\/latex] we multiply the entries in row [latex]i[\/latex] of [latex]A[\/latex] by column [latex]j[\/latex] in [latex]B[\/latex] and add. For example, given matrices [latex]A[\/latex] and [latex]B,\\text{}[\/latex] where the dimensions of [latex]A[\/latex] are [latex]2\\text{ }\\times \\text{ }3[\/latex] and the dimensions of [latex]B[\/latex] are [latex]3\\text{ }\\times \\text{ }3,\\text{}[\/latex] the product of [latex]AB[\/latex] will be a [latex]2\\text{ }\\times \\text{ }3[\/latex] matrix.<\/p>\n<div style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrr}\\hfill {a}_{11}& \\hfill {a}_{12}& \\hfill {a}_{13}\\\\ \\hfill {a}_{21}& \\hfill {a}_{22}& \\hfill {a}_{23}\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{rrr}\\hfill {b}_{11}& \\hfill {b}_{12}& \\hfill {b}_{13}\\\\ \\hfill {b}_{21}& \\hfill {b}_{22}& \\hfill {b}_{23}\\\\ \\hfill {b}_{31}& \\hfill {b}_{32}& \\hfill {b}_{33}\\end{array}\\right][\/latex]<\/div>\n<p>Multiply and add as follows to obtain the first entry of the product matrix [latex]AB[\/latex].<\/p>\n<ol>\n<li>To obtain the entry in row 1, column 1 of [latex]AB,\\text{}[\/latex] multiply the first row in [latex]A[\/latex] by the first column in [latex]B[\/latex], and add.\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\\end{array}\\right]\\cdot \\left[\\begin{array}{c}{b}_{11}\\\\ {b}_{21}\\\\ {b}_{31}\\end{array}\\right]={a}_{11}\\cdot {b}_{11}+{a}_{12}\\cdot {b}_{21}+{a}_{13}\\cdot {b}_{31}[\/latex]<\/div>\n<\/li>\n<li>To obtain the entry in row 1, column 2 of [latex]AB,\\text{}[\/latex] multiply the first row of [latex]A[\/latex] by the second column in [latex]B[\/latex], and add.\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\\end{array}\\right]\\cdot \\left[\\begin{array}{c}{b}_{12}\\\\ {b}_{22}\\\\ {b}_{32}\\end{array}\\right]={a}_{11}\\cdot {b}_{12}+{a}_{12}\\cdot {b}_{22}+{a}_{13}\\cdot {b}_{32}[\/latex]<\/div>\n<\/li>\n<li>To obtain the entry in row 1, column 3 of [latex]AB,\\text{}[\/latex] multiply the first row of [latex]A[\/latex] by the third column in [latex]B[\/latex], and add.\n<div style=\"text-align: center;\">[latex]\\left[\\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\\end{array}\\right]\\cdot \\left[\\begin{array}{c}{b}_{13}\\\\ {b}_{23}\\\\ {b}_{33}\\end{array}\\right]={a}_{11}\\cdot {b}_{13}+{a}_{12}\\cdot {b}_{23}+{a}_{13}\\cdot {b}_{33}[\/latex]<\/div>\n<\/li>\n<\/ol>\n<p>We proceed the same way to obtain the second row of [latex]AB[\/latex]. In other words, row 2 of [latex]A[\/latex] times column 1 of [latex]B[\/latex]; row 2 of [latex]A[\/latex] times column 2 of [latex]B[\/latex]; row 2 of [latex]A[\/latex] times column 3 of [latex]B[\/latex]. When complete, the product matrix will be<\/p>\n<div style=\"text-align: center;\">[latex]AB=\\left[\\begin{array}{c}\\begin{array}{l}{a}_{11}\\cdot {b}_{11}+{a}_{12}\\cdot {b}_{21}+{a}_{13}\\cdot {b}_{31}\\\\ \\end{array}\\\\ {a}_{21}\\cdot {b}_{11}+{a}_{22}\\cdot {b}_{21}+{a}_{23}\\cdot {b}_{31}\\end{array}\\begin{array}{c}\\begin{array}{l}{a}_{11}\\cdot {b}_{12}+{a}_{12}\\cdot {b}_{22}+{a}_{13}\\cdot {b}_{32}\\\\ \\end{array}\\\\ {a}_{21}\\cdot {b}_{12}+{a}_{22}\\cdot {b}_{22}+{a}_{23}\\cdot {b}_{32}\\end{array}\\begin{array}{c}\\begin{array}{l}{a}_{11}\\cdot {b}_{13}+{a}_{12}\\cdot {b}_{23}+{a}_{13}\\cdot {b}_{33}\\\\ \\end{array}\\\\ {a}_{21}\\cdot {b}_{13}+{a}_{22}\\cdot {b}_{23}+{a}_{23}\\cdot {b}_{33}\\end{array}\\right][\/latex]<\/div>\n<div class=\"textbox\">\n<h3>A General Note: Properties of Matrix Multiplication<\/h3>\n<p>For the matrices [latex]A,B,\\text{}[\/latex] and [latex]C[\/latex] the following properties hold.<\/p>\n<ul>\n<li>Matrix multiplication is associative:\n<div style=\"text-align: center;\">[latex]\\left(AB\\right)C=A\\left(BC\\right)[\/latex]<\/div>\n<\/li>\n<li>Matrix multiplication is distributive:\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\begin{array}{l}\\\\ C\\left(A+B\\right)=CA+CB,\\end{array}\\hfill \\\\ \\left(A+B\\right)C=AC+BC.\\hfill \\end{array}[\/latex]<\/div>\n<\/li>\n<\/ul>\n<p>Note that matrix multiplication is not commutative.<\/p>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Multiplying Two Matrices<\/h3>\n<p>Multiply matrix [latex]A[\/latex] and matrix [latex]B[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{cc}1& 2\\\\ 3& 4\\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{cc}5& 6\\\\ 7& 8\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q843176\">Show Solution<\/span><\/p>\n<div id=\"q843176\" class=\"hidden-answer\" style=\"display: none\">\n<p>First, we check the dimensions of the matrices. Matrix [latex]A[\/latex] has dimensions [latex]2\\times 2[\/latex] and matrix [latex]B[\/latex] has dimensions [latex]2\\times 2[\/latex]. The inner dimensions are the same so we can perform the multiplication. The product will have the dimensions [latex]2\\times 2[\/latex].<\/p>\n<p>We perform the operations outlined previously.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/896\/2016\/11\/03193520\/CNX_Precalc_Figure_09_05_0032.jpg\" alt=\"The first column of the product of A and B is defined as the result of matrix -vector multiplication of A and the first column of B. Column two of the product of A and B is defined as the result of the matrix-vector multiplication of A and the second column of B.\" width=\"487\" height=\"211\" \/><\/p>\n<\/div>\n<\/div>\n<p><b><\/b><\/p>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Multiplying Two Matrices<\/h3>\n<p>Given [latex]A[\/latex] and [latex]B:[\/latex]<\/p>\n<ol>\n<li>Find [latex]AB[\/latex].<\/li>\n<li>Find [latex]BA[\/latex].<\/li>\n<\/ol>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{l}\\begin{array}{ccc}-1& 2& 3\\end{array}\\hfill \\\\ \\begin{array}{ccc}4& 0& 5\\end{array}\\hfill \\end{array}\\right]\\text{ and }B=\\left[\\begin{array}{c}5\\\\ -4\\\\ 2\\end{array}\\begin{array}{c}-1\\\\ 0\\\\ 3\\end{array}\\right][\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q403957\">Show Solution<\/span><\/p>\n<div id=\"q403957\" class=\"hidden-answer\" style=\"display: none\">\n<ol>\n<li>As the dimensions of [latex]A[\/latex] are [latex]2\\text{}\\times \\text{}3[\/latex] and the dimensions of [latex]B[\/latex] are [latex]3\\text{}\\times \\text{}2,\\text{}[\/latex] these matrices can be multiplied together because the number of columns in [latex]A[\/latex] matches the number of rows in [latex]B[\/latex]. The resulting product will be a [latex]2\\text{}\\times \\text{}2[\/latex] matrix, the number of rows in [latex]A[\/latex] by the number of columns in [latex]B[\/latex].\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ AB=\\left[\\begin{array}{rrr}\\hfill -1& \\hfill 2& \\hfill 3\\\\ \\hfill 4& \\hfill 0& \\hfill 5\\end{array}\\right]\\text{ }\\left[\\begin{array}{rr}\\hfill 5& \\hfill -1\\\\ \\hfill -4& \\hfill 0\\\\ \\hfill 2& \\hfill 3\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rr}\\hfill -1\\left(5\\right)+2\\left(-4\\right)+3\\left(2\\right)& \\hfill -1\\left(-1\\right)+2\\left(0\\right)+3\\left(3\\right)\\\\ \\hfill 4\\left(5\\right)+0\\left(-4\\right)+5\\left(2\\right)& \\hfill 4\\left(-1\\right)+0\\left(0\\right)+5\\left(3\\right)\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rr}\\hfill -7& \\hfill 10\\\\ \\hfill 30& \\hfill 11\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/div>\n<\/li>\n<li>The dimensions of [latex]B[\/latex] are [latex]3\\times 2[\/latex] and the dimensions of [latex]A[\/latex] are [latex]2\\times 3[\/latex]. The inner dimensions match so the product is defined and will be a [latex]3\\times 3[\/latex] matrix.\n<div style=\"text-align: center;\">[latex]\\begin{array}{l}\\hfill \\\\ BA=\\left[\\begin{array}{rr}\\hfill 5& \\hfill -1\\\\ \\hfill -4& \\hfill 0\\\\ \\hfill 2& \\hfill 3\\end{array}\\right]\\text{ }\\left[\\begin{array}{rrr}\\hfill -1& \\hfill 2& \\hfill 3\\\\ \\hfill 4& \\hfill 0& \\hfill 5\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill 5\\left(-1\\right)+-1\\left(4\\right)& \\hfill 5\\left(2\\right)+-1\\left(0\\right)& \\hfill 5\\left(3\\right)+-1\\left(5\\right)\\\\ \\hfill -4\\left(-1\\right)+0\\left(4\\right)& \\hfill -4\\left(2\\right)+0\\left(0\\right)& \\hfill -4\\left(3\\right)+0\\left(5\\right)\\\\ \\hfill 2\\left(-1\\right)+3\\left(4\\right)& \\hfill 2\\left(2\\right)+3\\left(0\\right)& \\hfill 2\\left(3\\right)+3\\left(5\\right)\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rrr}\\hfill -9& \\hfill 10& \\hfill 10\\\\ \\hfill 4& \\hfill -8& \\hfill -12\\\\ \\hfill 10& \\hfill 4& \\hfill 21\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/div>\n<\/li>\n<\/ol>\n<h4>Analysis of the Solution<\/h4>\n<p>Notice that the products [latex]AB[\/latex] and [latex]BA[\/latex] are not equal.<\/p>\n<p style=\"text-align: center;\">[latex]AB=\\left[\\begin{array}{cc}-7& 10\\\\ 30& 11\\end{array}\\right]\\ne \\left[\\begin{array}{ccc}-9& 10& 10\\\\ 4& -8& -12\\\\ 10& 4& 21\\end{array}\\right]=BA[\/latex]<\/p>\n<p>This illustrates the fact that matrix multiplication is not commutative.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm127225\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=127225&theme=oea&iframe_resize_id=ohm127225\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<div class=\"textbox\">\n<h3>Q &amp; A<\/h3>\n<h3>Is it possible for <em>AB<\/em> to be defined but not <em>BA<\/em>?<\/h3>\n<p><em>Yes, consider a matrix A with dimension [latex]3\\times 4[\/latex] and matrix B with dimension [latex]4\\times 2[\/latex]. 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.<\/em><\/p>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Using Matrices in Real-World Problems<\/h3>\n<p>Let\u2019s return to the problem presented at the opening of this section. We have the table below, representing the equipment needs of two soccer teams.<\/p>\n<table summary=\"..\">\n<thead>\n<tr>\n<th><\/th>\n<th>Wildcats<\/th>\n<th>Mud Cats<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Goals<\/strong><\/td>\n<td>6<\/td>\n<td>10<\/td>\n<\/tr>\n<tr>\n<td><strong>Balls<\/strong><\/td>\n<td>30<\/td>\n<td>24<\/td>\n<\/tr>\n<tr>\n<td><strong>Jerseys<\/strong><\/td>\n<td>14<\/td>\n<td>20<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We are also given the prices of the equipment, as shown in the table below.<\/p>\n<table summary=\"..\">\n<tbody>\n<tr>\n<td><strong>Goal<\/strong><\/td>\n<td>$300<\/td>\n<\/tr>\n<tr>\n<td><strong>Ball<\/strong><\/td>\n<td>$10<\/td>\n<\/tr>\n<tr>\n<td><strong>Jersey<\/strong><\/td>\n<td>$30<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We will convert the data to matrices. Thus, the equipment need matrix is written as<\/p>\n<p style=\"text-align: center;\">[latex]E=\\left[\\begin{array}{c}6\\\\ 30\\\\ 14\\end{array}\\begin{array}{c}10\\\\ 24\\\\ 20\\end{array}\\right][\/latex]<\/p>\n<p>The cost matrix is written as<\/p>\n<p style=\"text-align: center;\">[latex]C=\\left[\\begin{array}{ccc}300& 10& 30\\end{array}\\right][\/latex]<br \/>\nWe perform matrix multiplication to obtain costs for the equipment.<br \/>\n[latex]\\begin{array}{l}\\hfill \\\\ \\hfill \\\\ CE=\\left[\\begin{array}{rrr}\\hfill 300& \\hfill 10& \\hfill 30\\end{array}\\right]\\cdot \\left[\\begin{array}{rr}\\hfill 6& \\hfill 10\\\\ \\hfill 30& \\hfill 24\\\\ \\hfill 14& \\hfill 20\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rr}\\hfill 300\\left(6\\right)+10\\left(30\\right)+30\\left(14\\right)& \\hfill 300\\left(10\\right)+10\\left(24\\right)+30\\left(20\\right)\\end{array}\\right]\\hfill \\\\ \\text{ }=\\left[\\begin{array}{rr}\\hfill 2,520& \\hfill 3,840\\end{array}\\right]\\hfill \\end{array}[\/latex]<\/p>\n<p>The total cost for equipment for the Wildcats is $2,520, and the total cost for equipment for the Mud Cats is $3,840.<\/p>\n<\/div>\n<div class=\"textbox\">\n<h3>How To: Given a matrix operation, evaluate using a calculator.<strong><br \/>\n<\/strong><\/h3>\n<ol>\n<li>Save each matrix as a matrix variable [latex]\\left[A\\right],\\left[B\\right],\\left[C\\right],..[\/latex].<\/li>\n<li>Enter the operation into the calculator, calling up each matrix variable as needed.<\/li>\n<li>If the operation is defined, the calculator will present the solution matrix; if the operation is undefined, it will display an error message.<\/li>\n<\/ol>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example: Using a Calculator to Perform Matrix Operations<\/h3>\n<p>Find [latex]AB-C[\/latex]\u00a0given<\/p>\n<p style=\"text-align: center;\">[latex]A=\\left[\\begin{array}{rrr}\\hfill -15& \\hfill 25& \\hfill 32\\\\ \\hfill 41& \\hfill -7& \\hfill -28\\\\ \\hfill 10& \\hfill 34& \\hfill -2\\end{array}\\right],B=\\left[\\begin{array}{rrr}\\hfill 45& \\hfill 21& \\hfill -37\\\\ \\hfill -24& \\hfill 52& \\hfill 19\\\\ \\hfill 6& \\hfill -48& \\hfill -31\\end{array}\\right],\\text{and }C=\\left[\\begin{array}{rrr}\\hfill -100& \\hfill -89& \\hfill -98\\\\ \\hfill 25& \\hfill -56& \\hfill 74\\\\ \\hfill -67& \\hfill 42& \\hfill -75\\end{array}\\right][\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q32907\">Solution<\/span><\/p>\n<div id=\"q32907\" class=\"hidden-answer\" style=\"display: none\">\n<p>On the matrix page of the calculator, we enter matrix [latex]A[\/latex] above as the matrix variable [latex]\\left[A\\right][\/latex], matrix [latex]B[\/latex] above as the matrix variable [latex]\\left[B\\right][\/latex], and matrix [latex]C[\/latex] above as the matrix variable [latex]\\left[C\\right][\/latex].<\/p>\n<p>On the home screen of the calculator, we type in the problem and call up each matrix variable as needed.<\/p>\n<p style=\"text-align: center;\">[latex]\\left[A\\right]\\times \\left[B\\right]-\\left[C\\right][\/latex]<br \/>\nThe calculator gives us the following matrix.<br \/>\n[latex]\\left[\\begin{array}{rrr}\\hfill -983& \\hfill -462& \\hfill 136\\\\ \\hfill 1,820& \\hfill 1,897& \\hfill -856\\\\ \\hfill -311& \\hfill 2,032& \\hfill 413\\end{array}\\right][\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h2>Key Concepts<\/h2>\n<ul>\n<li>A matrix is a rectangular array of numbers. Entries are arranged in rows and columns.<\/li>\n<li>The dimensions of a matrix refer to the number of rows and the number of columns. A [latex]3\\times 2[\/latex] matrix has three rows and two columns.<\/li>\n<li>We add and subtract matrices of equal dimensions by adding and subtracting corresponding entries of each matrix.<\/li>\n<li>Scalar multiplication involves multiplying each entry in a matrix by a constant.<\/li>\n<li>Scalar multiplication is often required before addition or subtraction can occur.<\/li>\n<li>Multiplying matrices is possible when inner dimensions are the same\u2014the number of columns in the first matrix must match the number of rows in the second.<\/li>\n<li>The product of two matrices, [latex]A[\/latex] and [latex]B[\/latex], is obtained by multiplying each entry in row 1 of [latex]A[\/latex] by each entry in column 1 of [latex]B[\/latex]; then multiply each entry of row 1 of [latex]A[\/latex] by each entry in columns 2 of [latex]B,\\text{}[\/latex] and so on.<\/li>\n<li>Many real-world problems can often be solved using matrices.<\/li>\n<li>We can use a calculator to perform matrix operations after saving each matrix as a matrix variable.<\/li>\n<\/ul>\n<h2>Glossary<\/h2>\n<dl id=\"fs-id1165134073074\" class=\"definition\">\n<dt>column<\/dt>\n<dd id=\"fs-id1165134073079\">a set of numbers aligned vertically in a matrix<\/dd>\n<\/dl>\n<dl id=\"fs-id1165135639171\" class=\"definition\">\n<dt>entry<\/dt>\n<dd id=\"fs-id1165135639177\">an element, coefficient, or constant in a matrix<\/dd>\n<\/dl>\n<dl id=\"fs-id1165135639180\" class=\"definition\">\n<dt>matrix<\/dt>\n<dd id=\"fs-id1165137937501\">a rectangular array of numbers<\/dd>\n<\/dl>\n<dl id=\"fs-id1165134033250\" class=\"definition\">\n<dt>row<\/dt>\n<dd id=\"fs-id1165137937510\">a set of numbers aligned horizontally in a matrix<\/dd>\n<\/dl>\n<dl id=\"fs-id1165135199312\" class=\"definition\">\n<dt>scalar multiple<\/dt>\n<dd id=\"fs-id1165135199316\">an entry of a matrix that has been multiplied by a scalar<\/dd>\n<\/dl>\n\n\t\t\t <section class=\"citations-section\" role=\"contentinfo\">\n\t\t\t <h3>Candela Citations<\/h3>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <div id=\"citation-list-15279\">\n\t\t\t\t\t\t\t <div class=\"licensing\"><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Specific attribution<\/div><ul class=\"citation-list\"><li>Precalculus. <strong>Authored by<\/strong>: OpenStax College. <strong>Provided by<\/strong>: OpenStax. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175:1\/Preface\">http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175:1\/Preface<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><\/ul><\/div>\n\t\t\t\t\t\t <\/div>\n\t\t\t\t\t <\/div>\n\t\t\t <\/section>","protected":false},"author":167848,"menu_order":21,"template":"","meta":{"_candela_citation":"[{\"type\":\"cc-attribution\",\"description\":\"Precalculus\",\"author\":\"OpenStax College\",\"organization\":\"OpenStax\",\"url\":\"http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175:1\/Preface\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"}]","CANDELA_OUTCOMES_GUID":"","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-15279","chapter","type-chapter","status-publish","hentry"],"part":13184,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/pressbooks\/v2\/chapters\/15279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/wp\/v2\/users\/167848"}],"version-history":[{"count":4,"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/pressbooks\/v2\/chapters\/15279\/revisions"}],"predecessor-version":[{"id":16691,"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/pressbooks\/v2\/chapters\/15279\/revisions\/16691"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/pressbooks\/v2\/parts\/13184"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/pressbooks\/v2\/chapters\/15279\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/wp\/v2\/media?parent=15279"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/pressbooks\/v2\/chapter-type?post=15279"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/wp\/v2\/contributor?post=15279"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/ccbcmd-math-1\/wp-json\/wp\/v2\/license?post=15279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}