// Numbas version: finer_feedback_settings {"name": "Calculating with vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculating with vectors", "tags": [], "metadata": {"description": "
Calculating with vectors of random size, including resolving brackets. Advice (i.e. solution) has conditional visibility to show only the correct size.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Let \\(u=\\var{u}\\), \\(v=\\var{v}\\) and \\(w=\\var{w}\\).
", "advice": "To multiply a vector by a scalar, we multiply each entry by that scalar. To add the resulting vectors, we add them entry by entry. Don't forget to resolve the brackets.
\nPart a)
\n\\[\\simplify{v + {lambda}*(u-{mu}w)}=\\begin{pmatrix}\\simplify[]{{v[0]}+{lambda}*({u[0]}-{mu}*{w[0]})} \\\\ \\simplify[]{{v[1]}+{lambda}*({u[1]}-{mu}*{w[1]})} \\end{pmatrix} = \\var{v+lambda*(u-mu*w)}\\]
\n\\[\\simplify{v + {lambda}*(u-{mu}w)}=\\begin{pmatrix}\\simplify[]{{v[0]}+{lambda}*({u[0]}-{mu}*{w[0]})} \\\\ \\simplify[]{{v[1]}+{lambda}*({u[1]}-{mu}*{w[1]})} \\\\\\simplify[]{{v[2]}+{lambda}*({u[2]}-{mu}*{w[2]})} \\end{pmatrix} = \\var{v+lambda*(u-mu*w)}\\]
\n\\[\\simplify{v + {lambda}*(u-{mu}w)}=\\begin{pmatrix}\\simplify[]{{v[0]}+{lambda}*({u[0]}-{mu}*{w[0]})} \\\\ \\simplify[]{{v[1]}+{lambda}*({u[1]}-{mu}*{w[1]})} \\\\\\simplify[]{{v[2]}+{lambda}*({u[2]}-{mu}*{w[2]})} \\\\\\simplify[]{{v[3]}+{lambda}*({u[3]}-{mu}*{w[3]})} \\end{pmatrix} = \\var{v+lambda*(u-mu*w)}\\]
Part b)
\n\\[\\simplify[]{{lambda1}*u +{mu}({mu1}v+{lambda}w)}=\\begin{pmatrix}\\simplify[]{{lambda1}{u[0]}+{mu}({mu1}{v[0]}+{lambda}*{w[0]})} \\\\\\simplify[]{{lambda1}{u[1]}+{mu}({mu1}{v[1]}+{lambda}*{w[1]})}\\end{pmatrix}=\\var{lambda1*u+mu*(mu1*v+lambda*w)} \\]
\n\\[\\simplify[]{{lambda1}*u +{mu}({mu1}v+{lambda}w)}=\\begin{pmatrix}\\simplify[]{{lambda1}{u[0]}+{mu}({mu1}{v[0]}+{lambda}*{w[0]})}\\\\ \\simplify[]{{lambda1}{u[1]}+{mu}({mu1}{v[1]}+{lambda}*{w[1]})}\\\\ \\simplify[]{{lambda1}{u[2]}+{mu}({mu1}{v[2]}+{lambda}*{w[2]})}\\end{pmatrix}=\\var{lambda1*u+mu*(mu1*v+lambda*w)} \\]
\n\\[\\simplify[]{{lambda1}*u +{mu}({mu1}v+{lambda}w)}=\\begin{pmatrix}\\simplify[]{{lambda1}{u[0]}+{mu}({mu1}{v[0]}+{lambda}*{w[0]})}\\\\ \\simplify[]{{lambda1}{u[1]}+{mu}({mu1}{v[1]}+{lambda}*{w[1]})}\\\\ \\simplify[]{{lambda1}{u[2]}+{mu}({mu1}{v[2]}+{lambda}*{w[2]})} \\\\ \\simplify[]{{lambda1}{u[3]}+{mu}({mu1}{v[3]}+{lambda}*{w[3]})} \\end{pmatrix}=\\var{lambda1*u+mu*(mu1*v+lambda*w)} \\]
", "rulesets": {}, "extensions": [], "variables": {"rows": {"name": "rows", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "size of the vectors
", "templateType": "anything"}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "vector((repeat(random(-5..5),rows)))", "description": "randomly generated vector of random size.
", "templateType": "anything"}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "vector(repeat(random(-5..5),rows))", "description": "randomly generated vector of same size as v
", "templateType": "anything"}, "u": {"name": "u", "group": "Ungrouped variables", "definition": "vector(repeat(random(-5..5),rows))", "description": "randomly generated vector of same size as v
", "templateType": "anything"}, "sign1": {"name": "sign1", "group": "Ungrouped variables", "definition": "random(-1..1 except 0)", "description": "randomly generated sign
", "templateType": "anything"}, "sign2": {"name": "sign2", "group": "Ungrouped variables", "definition": "random(-1..1 except 0)", "description": "", "templateType": "anything"}, "lambda": {"name": "lambda", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "mu": {"name": "mu", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "lambda1": {"name": "lambda1", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "mu1": {"name": "mu1", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "not is_zero(v) and not is_zero(w) and not is_zero(u) and lambda<>lambda1 and mu<>mu1 and mu1<>lambda and mu<>lambda and mu<>lambda1 and lambda1<>mu1", "maxRuns": 100}, "ungrouped_variables": ["rows", "v", "w", "u", "sign1", "sign2", "lambda", "mu", "lambda1", "mu1"], "variable_groups": [], "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": "Calculate \\(\\simplify{v + {lambda}*(u-{mu}w)}=\\) [[0]].
\n", "gaps": [{"type": "matrix", "useCustomName": true, "customName": "Gap 0", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "matrix", "useCustomName": true, "customName": "wrong brackets", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "You seem to have forgotten to multiply out the bracket properly.
", "useAlternativeFeedback": false, "correctAnswer": "v+lambda*u-mu*w", "correctAnswerFractions": false, "numRows": "1", "numColumns": "1", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": "1", "minRows": 1, "maxRows": 0}], "correctAnswer": "v+lambda*(u-mu*w)", "correctAnswerFractions": false, "numRows": "1", "numColumns": "1", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": "1", "minRows": 1, "maxRows": 0}], "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": "Calculate \\(\\simplify[]{{lambda1}*u +{mu}({mu1}v+{lambda}w)}=\\) [[0]].
\n", "gaps": [{"type": "matrix", "useCustomName": true, "customName": "Gap 0", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "matrix", "useCustomName": true, "customName": "wrong brackets", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "You seem to have forgotten to multiply out the bracket properly.
", "useAlternativeFeedback": false, "correctAnswer": "lambda1*u +mu*mu1*v+lambda*w", "correctAnswerFractions": false, "numRows": "1", "numColumns": "1", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": "1", "minRows": 1, "maxRows": 0}], "correctAnswer": "lambda1*u +mu*(mu1*v+lambda*w)", "correctAnswerFractions": false, "numRows": "1", "numColumns": "1", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": "1", "minRows": 1, "maxRows": 0}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Tatiana Tyukina", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/341/"}, {"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}]}], "contributors": [{"name": "Tatiana Tyukina", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/341/"}, {"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}