// Numbas version: exam_results_page_options {"name": "Adrian's copy Matrices: adding and subtracting two 3x3 matrices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

Adding and subtracting two 3x3 matrices.

", "licence": "Creative Commons Attribution 4.0 International"}, "variables": {"matrices": {"definition": "repeat(matrix(repeat(repeat(random(0..10)*random(1,1,1,-1),3),3)),3)", "description": "

A couple of random matrices to add

", "group": "Ungrouped variables", "templateType": "anything", "name": "matrices"}}, "advice": "

Remember : matrix multiplication requires each row of the first matrix A be multiplied by each column of the second matrix B:

\n

If \\[  A=\\left( \\begin{array}{ccc}
a & b & c  \\\\d & e & f\\\\g & h & j \\end{array} \\right),\\]

\n

and \\[ B=\\left( \\begin{array}{ccc}
k & l & m \\\\n & p & q\\\\r & s & t\\end{array} \\right)\\],

\n

then \\[ A+B=\\left( \\begin{array}{ccc}
a+k & b+l & c+m\\\\d+n & e+p & f+q   \\\\g+r & h+s & j+t
\\end{array} \\right)\\]

\n

\\[ A-B=\\left( \\begin{array}{ccc}
a-k & b-l & c-m\\\\d-n & e-p & f-q   \\\\g-r & h-s & j-t
\\end{array} \\right)\\]

\n

 

\n

 

\n

", "ungrouped_variables": ["matrices"], "name": "Adrian's copy Matrices: adding and subtracting two 3x3 matrices", "rulesets": {}, "preamble": {"css": "", "js": ""}, "tags": [], "variable_groups": [], "statement": "

You will possibly need to adjust the number of rows and the number of columns your solution requires by entering the correct values for your solution; the template will then alter to hold your solution.

", "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"type": "gapfill", "marks": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "prompt": "

What is $\\var{matrices[0]}+\\var{matrices[1]}$?

\n

[[0]]

", "customMarkingAlgorithm": "", "gaps": [{"type": "matrix", "marks": 1, "unitTests": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "tolerance": 0, "numColumns": 1, "numRows": 1, "markPerCell": false, "correctAnswerFractions": false, "allowFractions": false, "allowResize": true, "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true, "correctAnswer": "matrices[0]+matrices[1]"}], "sortAnswers": false, "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true}, {"type": "gapfill", "marks": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "prompt": "

What is $\\var{matrices[0]}-\\var{matrices[1]}$?

\n

[[0]]

", "customMarkingAlgorithm": "", "gaps": [{"type": "matrix", "marks": 1, "unitTests": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "tolerance": 0, "numColumns": 1, "numRows": 1, "markPerCell": false, "correctAnswerFractions": false, "allowFractions": false, "allowResize": true, "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true, "correctAnswer": "matrices[0]-matrices[1]"}], "sortAnswers": false, "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true}], "extensions": [], "functions": {}, "type": "question", "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}]}]}], "contributors": [{"name": "Adrian Jannetta", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/164/"}]}