// Numbas version: exam_results_page_options {"name": "Vectors: Linear Combinations 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Vectors: Linear Combinations 2", "tags": [], "metadata": {"description": "

Given 3 vectors $\\mathbf a$, $\\mathbf b$ and $\\mathbf c$, find the constants $p$, $q$ and $k$ such that $ p\\mathbf a + q \\mathbf b = \\mathbf c$, where $k$ is an unknown component of $\\mathbf c$ .

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

The vectors $\\mathbf a$, $\\mathbf b$ and $\\mathbf c$ are

\n

\\[ \\mathbf a = \\var{a},\\quad \\mathbf b = \\var{b},\\quad \\mathbf{c} = \\pmatrix{\\var{c[0]}\\\\\\var{c[1]}\\\\k}.\\]

", "advice": "

In order to find the values of $p$, $q$ and $k$, we want to first write $p\\, \\mathbf a +  q\\, \\mathbf b = \\mathbf c$ as a set of simultaneous equations:

\n

\\[ p \\var{a} + q \\var{b} = \\pmatrix{\\var{c[0]} \\\\ \\var{c[1]} \\\\ k} \\]

\n

\\[ \\implies \\begin{split}  \\simplify[all,!noLeadingMinus,unitFactor]{{a[0]} p + {b[0]} q} \\,&= \\var{c[0]} \\\\ \\simplify[all,!noLeadingMinus,unitFactor]{{a[1]}p+ {b[1]} q} \\,&= \\var{c[1]} \\\\ \\simplify[all,!noLeadingMinus,unitFactor]{{a[2]} p + {b[2]} q} \\,&= k \\end{split} \\]

\n

We want to begin by finding $p$ and $q$, which we can then use to find $k$. To find $p$ and $q$, this is easiest by focusing on the first 2 equations:

\n

\\[ \\begin{split}  \\simplify[all,!noLeadingMinus,unitFactor]{{a[0]} p + {b[0]} q} \\,&= \\var{c[0]} \\\\ \\simplify[all,!noLeadingMinus,unitFactor]{{a[1]}p+ {b[1]} q} \\,&= \\var{c[1]} \\end{split} \\]

\n

By solving these equations, we find that \\[ p = \\var{p} \\, \\text{and } q=\\var{q}.\\]

\n

Finally, substituting these values into the third equation we find \\[ k = \\var{c[2]}.\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "vector(repeat(random(-2..5 except 0),3))", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "vector(repeat(random(1..6),3))", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "p*a+q*b", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(-5..3 except [0,1])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "p", "q"], "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": "

If $p\\mathbf a + q \\mathbf b = \\mathbf c$ calculate $p$, $q$ and $k$: \\[\\]

\n

$p= $[[0]]

\n

$q= $[[1]]

\n

$k= $[[2]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{p}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{c[2]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}