{"base":{"id":"olm11-19-04","subject":"Mathematics","title":"Multiplying two matrices","scene":"olm11","steps":[{"mode":"fig","fig":{"view":[0,0,10,9],"items":[{"k":"mat","p":[2.2,6.5],"rows":[[40,60]],"t":"","col":"b","cw":120,"ch":80},{"k":"mat","p":[5.4,6.5],"rows":[[3],[2]],"t":"","col":"o","cw":110,"ch":80},{"k":"txt","p":[7.2,6.5],"t":"=","col":"k","size":50},{"k":"mat","p":[8.8,6.5],"rows":[[240]],"t":"","col":"g","cw":130,"ch":80,"s":1},{"k":"txt","p":[5,3.2],"t":"40 × 3 + 60 × 2","col":"k","size":44,"s":1},{"k":"txt","p":[5,1.8],"t":"= 120 + 120 = 240","col":"g","size":44,"s":1}],"stages":1},"say":["A 1 × 2 row matrix times a 2 × 1 column matrix.","Multiply in pairs and add: a 1 × 1 answer."],"actions":[{"id":"step","label":"Show the next step"}],"eyebrow":"Row times column","title":"The basic step","body":"Matrix multiplication is built from one step: a row times a column. Multiply the first elements together, the second elements together, and add. Prices (40 60) and numbers bought (3; 2) give the total cost 40 × 3 + 60 × 2 = 240."},{"mode":"matmul","actions":[{"id":"step","label":"Show the next entry"}],"A":[[1,2],[3,4]],"B":[[5,6],[7,8]],"eyebrow":"Two by two","title":"Each entry is a row times a column","body":"To multiply two 2 × 2 matrices, each entry of the answer comes from one row of the first matrix and one column of the second. Row 1 with column 1 gives the entry in row 1, column 1. Press the button to fill the four entries."},{"mode":"fig","work":{"title":"Write it like this","lines":[{"t":"(2 × 2)(2 × 2)   →   2 × 2","note":"inner 2 = 2"},{"t":"(1 × 2)(2 × 1)   →   1 × 1","note":"inner 2 = 2"},{"t":"(2 × 1)(1 × 2)   →   2 × 2","note":"inner 1 = 1"},{"t":"(2 × 2)(1 × 2)   ✗","note":"inner 2 ≠ 1: cannot be multiplied"}]},"say":["Tap for four cases.","Two square matrices.","Row times column: one number.","Column times row: a 2 × 2 matrix.","The inner numbers differ."],"actions":[{"id":"step","label":"Show the next step"}],"eyebrow":"Can they be multiplied?","title":"Columns of the first = rows of the second","body":"Two matrices can be multiplied only if the number of columns of the first equals the number of rows of the second. Write the orders side by side: the two inner numbers must match, and the two outer numbers give the order of the answer."},{"mode":"matmul","actions":[{"id":"step","label":"Show the next entry"}],"A":[[5,6],[7,8]],"B":[[1,2],[3,4]],"eyebrow":"Order matters","title":"AB is not BA","body":"Here the same two matrices are multiplied the other way round: B first, then A. The answer is different from before. For matrices, AB and BA are usually not equal, so keep the order given in the question."},{"mode":"quiz","look":"fig","fig":{"view":[0,0,10,10],"items":[{"k":"mat","p":[2.4,5],"rows":[[2,1],[3,4]],"t":"","col":"b","cw":120,"ch":90},{"k":"txt","p":[5,5],"t":"×","col":"k","size":56},{"k":"mat","p":[7.6,5],"rows":[[5,0],[1,2]],"t":"","col":"o","cw":120,"ch":90}]},"eyebrow":"Check yourself","title":"One entry","body":"A = (2 1; 3 4) and B = (5 0; 1 2).","question":"What is the entry in row 1, column 1 of AB?","options":["11","10","7"],"answer":0,"right":"Correct. Row 1 of A times column 1 of B: 2 × 5 + 1 × 1 = 11.","wrong":"Not quite. Use row 1 of A, (2 1), with column 1 of B, (5; 1): multiply in pairs and add."}],"more":[{"type":"cards","id":"detail","eyebrow":"The ideas in detail","title":"Matrix multiplication in detail","items":[{"tag":"Method","title":"The four entries of a 2 × 2 product","body":"(a b; c d)(p q; r s) = (ap + br   aq + bs;   cp + dr   cq + ds).\n\nEntry in row i, column j = row i of the first matrix × column j of the second.\n\n(1 2; 3 4)(5 6; 7 8) = (1×5+2×7   1×6+2×8;   3×5+4×7   3×6+4×8) = (19 22; 43 50)."},{"tag":"Condition","title":"Checking the orders","body":"A of order m × n and B of order n × p can be multiplied; AB has order m × p.\n\nIf the number of columns of A is not the number of rows of B, the product AB does not exist: a row of A and a column of B would have different numbers of elements, so they cannot be paired.\n\nThe O/L syllabus asks for products up to 2 × 2."},{"tag":"Unit matrix","title":"Multiplying by I changes nothing","body":"With I = (1 0; 0 1): AI = IA = A for every 2 × 2 matrix A.\n\n(2 1; 3 4)(1 0; 0 1) = (2 1; 3 4).\n\nThe unit matrix does for matrices what the number 1 does for ordinary multiplication. That is why it is called the unit matrix."}]},{"type":"cards","id":"ideas","eyebrow":"Marks lost in the exam","title":"Common mistakes","items":[{"tag":"Common mistake","title":"Multiplying matching positions","body":"(1 2; 3 4)(5 6; 7 8) is NOT (5 12; 21 32). Position-by-position works for addition only. Multiplication uses a row with a column."},{"tag":"Common mistake","title":"Assuming AB = BA","body":"(1 2; 3 4)(5 6; 7 8) = (19 22; 43 50), but (5 6; 7 8)(1 2; 3 4) = (23 34; 31 46). Always multiply in the order written."}]},{"type":"quiz","id":"quiz","eyebrow":"Go further","title":"Thirty questions: easy, medium, hard","questions":[{"level":"easy","question":"The product AB exists only when the number of columns of A equals the number of…","options":["columns of B","rows of B","elements of B"],"answer":1,"right":"Correct. (m × n)(n × p): the inner numbers match.","wrong":"Not quite. Compare the two middle numbers of the orders."},{"level":"easy","question":"A is 2 × 2 and B is 2 × 2. What is the order of AB?","options":["3 × 2","AB does not exist","2 × 2"],"answer":2,"right":"Correct. Inner numbers 2 and 2 match; outer numbers give the order.","wrong":"Not quite. (m × n)(n × p) → m × p."},{"level":"easy","question":"A is 1 × 2 and B is 2 × 1. What is the order of AB?","options":["2 × 2","AB does not exist","1 × 1"],"answer":2,"right":"Correct. Inner numbers 2 and 2 match; outer numbers give the order.","wrong":"Not quite. (m × n)(n × p) → m × p."},{"level":"easy","question":"A is 2 × 1 and B is 1 × 2. What is the order of AB?","options":["1 × 1","2 × 2","AB does not exist"],"answer":1,"right":"Correct. Inner numbers 1 and 1 match; outer numbers give the order.","wrong":"Not quite. (m × n)(n × p) → m × p."},{"level":"easy","question":"A is 2 × 2 and B is 1 × 2. What is the order of AB?","options":["2 × 2","2 × 1","AB does not exist"],"answer":2,"right":"Correct. Inner numbers 2 and 1 do not match.","wrong":"Not quite. (m × n)(n × p) → m × p."},{"level":"easy","question":"A is 2 × 3 and B is 3 × 1. What is the order of AB?","options":["3 × 3","2 × 1","AB does not exist"],"answer":1,"right":"Correct. Inner numbers 3 and 3 match; outer numbers give the order.","wrong":"Not quite. (m × n)(n × p) → m × p."},{"level":"easy","question":"A is 1 × 2 and B is 1 × 2. What is the order of AB?","options":["AB does not exist","1 × 2","2 × 1"],"answer":0,"right":"Correct. Inner numbers 2 and 1 do not match.","wrong":"Not quite. (m × n)(n × p) → m × p."},{"level":"easy","question":"[2 3] × [4; 1] = ? (a ; starts a new row)","options":["[11]","[8 3]","[10]"],"answer":0,"right":"Correct. 2 × 4 + 3 × 1.","wrong":"Not quite. Multiply in pairs and add."},{"level":"easy","question":"[1 5] × [2; 3] = ? (a ; starts a new row)","options":["[2 15]","[17]","[11]"],"answer":1,"right":"Correct. 1 × 2 + 5 × 3.","wrong":"Not quite. Multiply in pairs and add."},{"level":"easy","question":"[40 60] × [3; 2] = ? (a ; starts a new row)","options":["[240]","[120 120]","[105]"],"answer":0,"right":"Correct. 40 × 3 + 60 × 2.","wrong":"Not quite. Multiply in pairs and add."},{"level":"medium","question":"[1 2; 3 4] × [5 6; 7 8] = ? (a ; starts a new row)","options":["[5 12; 21 32]","[23 34; 31 46]","[19 22; 43 50]"],"answer":2,"right":"Correct. Top left: 1 × 5 + 2 × 7 = 19.","wrong":"Not quite. Each element is a row of the first times a column of the second."},{"level":"medium","question":"[2 1; 3 4] × [5 0; 1 2] = ? (a ; starts a new row)","options":["[10 0; 3 8]","[10 5; 8 9]","[11 2; 19 8]"],"answer":2,"right":"Correct. Top left: 2 × 5 + 1 × 1 = 11.","wrong":"Not quite. Each element is a row of the first times a column of the second."},{"level":"medium","question":"[1 0; 2 3] × [4 1; 0 2] = ? (a ; starts a new row)","options":["[4 0; 0 6]","[4 1; 8 8]","[6 3; 4 6]"],"answer":1,"right":"Correct. Top left: 1 × 4 + 0 × 0 = 4.","wrong":"Not quite. Each element is a row of the first times a column of the second."},{"level":"medium","question":"[2 3; 1 0] × [1 2; 3 1] = ? (a ; starts a new row)","options":["[2 6; 3 0]","[11 7; 1 2]","[4 3; 7 9]"],"answer":1,"right":"Correct. Top left: 2 × 1 + 3 × 3 = 11.","wrong":"Not quite. Each element is a row of the first times a column of the second."},{"level":"medium","question":"[3 1; 2 2] × [1 4; 2 0] = ? (a ; starts a new row)","options":["[3 4; 4 0]","[11 9; 6 2]","[5 12; 6 8]"],"answer":2,"right":"Correct. Top left: 3 × 1 + 1 × 2 = 5.","wrong":"Not quite. Each element is a row of the first times a column of the second."},{"level":"medium","question":"[1 2; 3 4] × [5; 6] = ? (a ; starts a new row)","options":["[17; 39]","[39; 17]","[17 39]"],"answer":0,"right":"Correct. 1 × 5 + 2 × 6 = 17 and 3 × 5 + 4 × 6 = 39.","wrong":"Not quite. The answer is a 2 × 1 column."},{"level":"medium","question":"[2 0; 1 3] × [4; 1] = ? (a ; starts a new row)","options":["[7; 8]","[8 7]","[8; 7]"],"answer":2,"right":"Correct. 2 × 4 + 0 × 1 = 8 and 1 × 4 + 3 × 1 = 7.","wrong":"Not quite. The answer is a 2 × 1 column."},{"level":"medium","question":"[3 1; 2 5] × [2; 3] = ? (a ; starts a new row)","options":["[19; 9]","[9; 19]","[9 19]"],"answer":1,"right":"Correct. 3 × 2 + 1 × 3 = 9 and 2 × 2 + 5 × 3 = 19.","wrong":"Not quite. The answer is a 2 × 1 column."},{"level":"medium","question":"A = [1 2; 3 4] and I = [1 0; 0 1]. What is AI? (a ; starts a new row)","options":["[1 2; 3 4]","[1 0; 0 4]","[2 2; 3 5]"],"answer":0,"right":"Correct. Multiplying by the unit matrix leaves A unchanged.","wrong":"Not quite. I behaves like the number 1."},{"level":"medium","question":"For two 2 × 2 matrices, is AB always equal to BA?","options":["No: the order of multiplication matters","Yes, always","Only when both are symmetric"],"answer":0,"right":"Correct. Matrix multiplication is not commutative.","wrong":"Not quite. Try [1 2; 3 4] and [0 1; 1 0]."},{"level":"hard","question":"A = [1 2; 3 4] and B = [0 1; 1 0]. Find AB. (a ; starts a new row)","options":["[2 1; 4 3]","[3 4; 1 2]","[1 2; 3 4]"],"answer":0,"right":"Correct. B swaps the columns of A.","wrong":"Not quite. Row of A times column of B."},{"level":"hard","question":"For the same A and B, find BA. (a ; starts a new row)","options":["[2 1; 4 3]","[1 2; 3 4]","[3 4; 1 2]"],"answer":2,"right":"Correct. B swaps the rows of A, so BA ≠ AB.","wrong":"Not quite. Now B comes first."},{"level":"hard","question":"A = [1 2; 0 3]. Find A² (that is, A × A). (a ; starts a new row)","options":["[1 8; 0 9]","[1 4; 0 9]","[2 4; 0 6]"],"answer":0,"right":"Correct. A² means A × A, not each element squared.","wrong":"Not quite. Multiply the matrix by itself."},{"level":"hard","question":"[2 1; 1 3] × [x; y] = [7; 11]. What are x and y? (a ; starts a new row)","options":["x = 3, y = 2","x = 2, y = 3","x = 1, y = 5"],"answer":1,"right":"Correct. 2x + y = 7 and x + 3y = 11.","wrong":"Not quite. The product gives two simultaneous equations."},{"level":"hard","question":"[x 2; 1 3] × [1; 2] = [9; 7]. What is x? (a ; starts a new row)","options":["9","7","5"],"answer":2,"right":"Correct. x + 4 = 9.","wrong":"Not quite. Use the first row."},{"level":"hard","question":"A shop sells 40 pens and 60 books at prices [3; 2] hundred rupees. What does [40 60] × [3; 2] give? (a ; starts a new row)","options":["[120 120]","[240], the total income in hundred rupees","[105]"],"answer":1,"right":"Correct. 40 × 3 + 60 × 2.","wrong":"Not quite. Quantity × price, added."},{"level":"hard","question":"A is 2 × 3 and B is 3 × 2. What are the orders of AB and BA?","options":["both are 2 × 3","neither exists","AB is 2 × 2 and BA is 3 × 3"],"answer":2,"right":"Correct. (2 × 3)(3 × 2) and (3 × 2)(2 × 3).","wrong":"Not quite. Outer numbers give the order."},{"level":"hard","question":"[1 2; 3 4] × [2 0; 0 2] = ? (a ; starts a new row)","options":["[2 4; 6 8]","[2 0; 0 8]","[3 2; 3 6]"],"answer":0,"right":"Correct. [2 0; 0 2] = 2I, so the product is 2A.","wrong":"Not quite. This matrix doubles every element."},{"level":"hard","question":"[1 1; 0 1] × [1 1; 0 1] = ? (a ; starts a new row)","options":["[1 1; 0 1]","[1 2; 0 1]","[2 2; 0 2]"],"answer":1,"right":"Correct. Top right: 1 × 1 + 1 × 1 = 2.","wrong":"Not quite. Work out each of the four elements."},{"level":"hard","question":"[a 0; 0 b] × [c 0; 0 d] = ? (a ; starts a new row)","options":["[ac ad; bc bd]","[a + c 0; 0 b + d]","[ac 0; 0 bd]"],"answer":2,"right":"Correct. For diagonal matrices the diagonal elements multiply.","wrong":"Not quite. The zeros remove the other terms."}]},{"type":"keywords","id":"words","title":"Key words","items":[{"word":"Matrix multiplication","meaning":"Combining two matrices by multiplying rows of the first with columns of the second."},{"word":"Product","meaning":"The matrix obtained by multiplying two matrices."},{"word":"Row × column","meaning":"Multiply matching elements in pairs and add the results."},{"word":"Compatible","meaning":"Able to be multiplied: columns of the first equal rows of the second."},{"word":"Unit matrix","meaning":"The matrix I that leaves any matrix unchanged when multiplied."},{"word":"Entry","meaning":"An element of a matrix, named by its row and column."}]},{"type":"checklist","id":"check","title":"I can…","items":["multiply a row matrix by a column matrix","multiply two matrices of order up to 2 × 2","give reasons why two matrices can or cannot be multiplied"]},{"type":"sources","id":"sources","title":"Sources","items":["NIE Sri Lanka, Mathematics syllabus and Teachers' Guide, Grade 11 (competency level 20.4)."]}],"slug":"multiplying-two-matrices"},"overlay":null}