// Numbas version: finer_feedback_settings {"name": "Scalar Multiple of a Matrix", "extensions": [], "custom_part_types": [], "resources": [["question-resources/matrix_add.gif", "/srv/numbas/media/question-resources/matrix_add.gif"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Scalar Multiple of a Matrix", "tags": [], "metadata": {"description": "Scalar Multiplication (pre-defined sizes in answers)", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

Scalar Multiple of a Matrix

\n

Carry out the scalar multiplication on the following matrices

", "advice": "

We carry out the calculation by multiplying each element by the constant:

\n

a)

\n

$$
\\begin{aligned}
\\var{k1}A &= \\var{k1}\\var{A} \\\\
&=\\begin{pmatrix}
\\var{k1} \\times \\var{A[0][0]} & \\var{k1} \\times \\var{A[0][1]}& \\var{k1} \\times \\var{A[0][2]}\\\\
\\var{k1} \\times \\var{A[1][0]} & \\var{k1} \\times \\var{A[1][1]}& \\var{k1} \\times \\var{A[1][2]}\\\\
\\var{k1} \\times \\var{A[2][0]} & \\var{k1} \\times \\var{A[2][1]} & \\var{k1} \\times \\var{A[2][2]}\\\\
\\end{pmatrix} \\\\
&= \\var{ad1} 
\\end{aligned}
$$

\n

b)

\n

Using the same technique, we get:

\n

$$
\\begin{aligned}
\\var{k2}B &= \\var{k2}\\var{B} \\\\
&= \\var{ad2}
\\end{aligned}
$$ 

\n

c)

\n

$$
\\begin{aligned}
\\var{k3}C &= \\var{k3}\\var{C} \\\\
&= \\var{ad3}
\\end{aligned}
$$ 

\n

d)

\n

$$
\\begin{aligned}
\\var{k4}D &= \\var{k4}\\var{D} \\\\
&= \\var{ad4}
\\end{aligned}
$$ 

\n

e)

\n

$$
\\begin{aligned}
\\var{k5}E &= \\var{k5}\\var{EE} \\\\
&= \\var{ad5}
\\end{aligned}
$$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"m1": {"name": "m1", "group": "A", "definition": "n1", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "A", "definition": "transpose(matrix(repeat(repeat(random(0..9),n1),m1)))", "description": "", "templateType": "anything", "can_override": false}, "n2": {"name": "n2", "group": "B", "definition": "random(2 .. 4#1)", "description": "", "templateType": "randrange", "can_override": false}, "m2": {"name": "m2", "group": "B", "definition": "random(2 .. 4#1)", "description": "", "templateType": "randrange", "can_override": false}, "B": {"name": "B", "group": "B", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n2),m2)))", "description": "", "templateType": "anything", "can_override": false}, "n3": {"name": "n3", "group": "C", "definition": "random(1 .. 4#1)", "description": "", "templateType": "randrange", "can_override": false}, "m3": {"name": "m3", "group": "C", "definition": "random(2 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}, "C": {"name": "C", "group": "C", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n3),m3)))", "description": "", "templateType": "anything", "can_override": false}, "n4": {"name": "n4", "group": "D", "definition": "random(1 .. 3#1)", "description": "", "templateType": "randrange", "can_override": false}, "m4": {"name": "m4", "group": "D", "definition": "random(2 .. 4#1)", "description": "", "templateType": "randrange", "can_override": false}, "n1": {"name": "n1", "group": "A", "definition": "3", "description": "", "templateType": "number", "can_override": false}, "D": {"name": "D", "group": "D", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n4),m4)))", "description": "", "templateType": "anything", "can_override": false}, "n5": {"name": "n5", "group": "E", "definition": "random(1 .. 3#1)", "description": "", "templateType": "randrange", "can_override": false}, "m5": {"name": "m5", "group": "E", "definition": "random(2 .. 4#1)", "description": "", "templateType": "randrange", "can_override": false}, "EE": {"name": "EE", "group": "E", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n5),m5)))", "description": "", "templateType": "anything", "can_override": false}, "e1": {"name": "e1", "group": "A", "definition": "A[n1-1][m1-1]", "description": "", "templateType": "anything", "can_override": false}, "E2": {"name": "E2", "group": "B", "definition": "b[n2-1][m2-1]", "description": "", "templateType": "anything", "can_override": false}, "trC": {"name": "trC", "group": "C", "definition": "(C[0][0])+(C[1][1])+(C[2][2])+(C[3][3])+(C[4][4])", "description": "", "templateType": "anything", "can_override": false}, "A2": {"name": "A2", "group": "A", "definition": "transpose(matrix(repeat(repeat(random(0..9),n1),m1)))", "description": "", "templateType": "anything", "can_override": false}, "B2": {"name": "B2", "group": "B", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n2),m2)))", "description": "", "templateType": "anything", "can_override": false}, "C2": {"name": "C2", "group": "C", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n3),m3)))", "description": "", "templateType": "anything", "can_override": false}, "D2": {"name": "D2", "group": "D", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n4),m4)))", "description": "", "templateType": "anything", "can_override": false}, "EE2": {"name": "EE2", "group": "E", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n5),m5)))", "description": "", "templateType": "anything", "can_override": false}, "ad1": {"name": "ad1", "group": "Ungrouped variables", "definition": "{k1}{A}", "description": "", "templateType": "anything", "can_override": false}, "ad2": {"name": "ad2", "group": "Ungrouped variables", "definition": "{k2}{B}", "description": "", "templateType": "anything", "can_override": false}, "ad3": {"name": "ad3", "group": "Ungrouped variables", "definition": "{k3}{C}", "description": "", "templateType": "anything", "can_override": false}, "ad4": {"name": "ad4", "group": "Ungrouped variables", "definition": "{k4}{D}", "description": "", "templateType": "anything", "can_override": false}, "ad5": {"name": "ad5", "group": "Ungrouped variables", "definition": "{k5}{EE}", "description": "", "templateType": "anything", "can_override": false}, "k1": {"name": "k1", "group": "scalar constants", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "k2": {"name": "k2", "group": "scalar constants", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "k3": {"name": "k3", "group": "scalar constants", "definition": "random(-9..9 except 0 except 1)", "description": "", "templateType": "anything", "can_override": false}, "k4": {"name": "k4", "group": "scalar constants", "definition": "random(-9..9 except 0 except 1)", "description": "", "templateType": "anything", "can_override": false}, "k5": {"name": "k5", "group": "scalar constants", "definition": "random(-9..9 except 0 except 1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ad1", "ad2", "ad3", "ad4", "ad5"], "variable_groups": [{"name": "A", "variables": ["n1", "m1", "A", "e1", "A2"]}, {"name": "B", "variables": ["n2", "m2", "B", "E2", "B2"]}, {"name": "C", "variables": ["n3", "m3", "C", "trC", "C2"]}, {"name": "D", "variables": ["n4", "m4", "D", "D2"]}, {"name": "E", "variables": ["n5", "m5", "EE", "EE2"]}, {"name": "scalar constants", "variables": ["k1", "k2", "k3", "k4", "k5"]}], "functions": {"calculateTrace": {"parameters": [], "type": "number", "language": "javascript", "definition": ""}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Let:

\n

$$
A=\\var{A}
$$

\n

Calculate $\\var{k1} A$:

\n

$\\var{k1}A=$ [[0]]

\n

\n

\n

", "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": "{k1}{A}", "correctAnswerFractions": false, "numRows": "{n1}", "numColumns": "{m1}", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"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": "

Let:

\n

$$
B=\\var{B}
$$

\n

Calculate $\\var{k2}B$:

\n

$\\var{k2}B=$ [[0]]

", "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": "{k2}{B}", "correctAnswerFractions": false, "numRows": "{n2}", "numColumns": "{m2}", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"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": "

Let:

\n

$$
C=\\var{C}
$$

\n

Calculate $\\var{k3}C$:

\n

$\\var{k3}C=$ [[0]]

", "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": "{k3}{C}", "correctAnswerFractions": false, "numRows": "{n3}", "numColumns": "{m3}", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"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": "

Let:

\n

$$
D=\\var{D}
$$

\n

Calculate $\\var{k4}D$:

\n

$\\var{k4}D=$ [[0]]

", "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": "{k4}{D}", "correctAnswerFractions": false, "numRows": "{n4}", "numColumns": "{m4}", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"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": "

Let:

\n

$$
E=\\var{EE}
$$

\n

Calculate $\\var{k5}E$:

\n

$\\var{k5}E=$ [[0]]

", "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": "{k5}{EE}", "correctAnswerFractions": false, "numRows": "{n5}", "numColumns": "{m5}", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}]}]}], "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}]}