// Numbas version: exam_results_page_options {"name": "Matrices: Multiplication 04", "extensions": [], "custom_part_types": [], "resources": [["question-resources/matrixMult.png", "/srv/numbas/media/question-resources/matrixMult.png"], ["question-resources/Matrix_Multiplication_02.gif", "/srv/numbas/media/question-resources/Matrix_Multiplication_02.gif"], ["question-resources/Matrix_Multiplication_01.gif", "/srv/numbas/media/question-resources/Matrix_Multiplication_01.gif"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Matrices: Multiplication 04", "tags": [], "metadata": {"description": "

Multiplying matrices (pre-defined sizes in answers)

\n

Introduces unit/identity matrices

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

An $n \\times p$ matrix $A$ can be multiplied by a $p \\times n$ matrix $B$ to form an $n \\times m$ matrix $AB=C$.

\n

The number of columns of $A$ must match the number of rows of $B$.

\n

\n

The element in the $i^{th}$ row and $j^{th}$ column of $C$ is obtained by multiplying the $i^{th}$ row of $A$ with the $j^{th}$ column of $B$.

", "advice": "

We are asked to carry out matix multiplications that have some (perhaps) surprising answers.

\n

 

\n

The matrix $\\var{I2}$ is called the identity matrix or unit matrix of order $2$, and is usually denoted by the symbol $I$. (Strictly we would write $I_2$, to indicate the size.)

\n

$I$ plays the same role in matrix multiplication as the number $1$ does in number multiplication.

\n

\n

Therefore:

\n

just as    $a \\times 1 = 1 \\times a = a$    for any number  $a$, so    $AI = IA = A$    for any matrix   $A$.

\n

", "rulesets": {}, "extensions": [], "variables": {"n1": {"name": "n1", "group": "Matrix A", "definition": "2", "description": "", "templateType": "number"}, "m1": {"name": "m1", "group": "Matrix A", "definition": "2", "description": "", "templateType": "number"}, "A1": {"name": "A1", "group": "Matrix A", "definition": " transpose(matrix(repeat(repeat(random(0..9),m1),n1)))", "description": "", "templateType": "anything"}, "A2": {"name": "A2", "group": "Matrix A", "definition": "transpose(matrix(repeat(repeat(random(0..9),m1),n1)))", "description": "", "templateType": "anything"}, "ProdA": {"name": "ProdA", "group": "Matrix A", "definition": "{A1}{A2}", "description": "", "templateType": "anything"}, "n2": {"name": "n2", "group": "Matrix B", "definition": "3", "description": "", "templateType": "number"}, "m2": {"name": "m2", "group": "Matrix B", "definition": "3", "description": "", "templateType": "number"}, "B1": {"name": "B1", "group": "Matrix B", "definition": "transpose(matrix(repeat(repeat(random(0..9),n2),m2)))", "description": "", "templateType": "anything"}, "B2": {"name": "B2", "group": "Matrix B", "definition": "transpose(matrix(repeat(repeat(random(0..9),m2),n2)))", "description": "", "templateType": "anything"}, "ProdB": {"name": "ProdB", "group": "Matrix B", "definition": "{B1}{B2}", "description": "", "templateType": "anything"}, "n3": {"name": "n3", "group": "Matrix C", "definition": "3", "description": "", "templateType": "number"}, "m3": {"name": "m3", "group": "Matrix C", "definition": "3", "description": "", "templateType": "number"}, "C1": {"name": "C1", "group": "Matrix C", "definition": "transpose(matrix(repeat(repeat(random(0..9),n3),m3)))", "description": "", "templateType": "anything"}, "m3a": {"name": "m3a", "group": "Matrix C", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "C2": {"name": "C2", "group": "Matrix C", "definition": "transpose(matrix(repeat(repeat(random(0..9),m3),m3a)))", "description": "", "templateType": "anything"}, "prodC": {"name": "prodC", "group": "Matrix C", "definition": "{C1}{C2}", "description": "", "templateType": "anything"}, "row1A": {"name": "row1A", "group": "Matrix A", "definition": "A1[0][0..1]", "description": "", "templateType": "anything"}, "I2": {"name": "I2", "group": "Ungrouped variables", "definition": "id(n1)", "description": "", "templateType": "anything"}, "I3": {"name": "I3", "group": "Ungrouped variables", "definition": "id(n2)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["I2", "I3"], "variable_groups": [{"name": "Matrix A", "variables": ["n1", "m1", "A1", "A2", "ProdA", "row1A"]}, {"name": "Matrix B", "variables": ["n2", "m2", "B1", "B2", "ProdB"]}, {"name": "Matrix C", "variables": ["n3", "m3", "C1", "m3a", "C2", "prodC"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Carry out the following multiplications:

\n

 

\n

$A_1 I_2=\\var{A1}\\var{I2} $

\n

$A_1 I_2=$ [[0]]

\n

\n

$B_1 I_3=\\var{B1}\\var{I3}$

\n

$B_1 I_3=$ [[1]]

\n

  

\n

$C_1 I_3=\\var{C1}\\var{I3}$

\n

$C_1 I_3=$ [[2]]

\n

 

\n

$I_3 C_1=\\var{C1}\\var{I3}$

\n

$I_3 C_1=$ [[3]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "{A1}", "correctAnswerFractions": false, "numRows": "{n1}", "numColumns": "{n1}", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "{B1}", "correctAnswerFractions": false, "numRows": "n2", "numColumns": "n2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "{C1}", "correctAnswerFractions": false, "numRows": "n2", "numColumns": "n2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "{C1}", "correctAnswerFractions": false, "numRows": "n2", "numColumns": "n2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}]}]}], "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}]}