// Numbas version: finer_feedback_settings {"name": "Simon's copy of Do three given vectors form a spanning set and are they linearly independent?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [{"variables": ["v1", "v2", "v3", "tt"], "name": "Shown to the student"}, {"variables": ["cannot", "only", "independent"], "name": "Strings"}, {"variables": ["is_independent", "t", "rs", "r1", "r2", "r3", "w_x", "w_y"], "name": "Setup"}, {"variables": ["marking_matrix_independent"], "name": "Marking"}, {"variables": ["w", "x", "y", "z"], "name": "Base vectors"}, {"variables": ["p", "q", "coeff_v1", "coeff_v2", "coeff_v3"], "name": "Solution"}], "tags": [], "parts": [{"unitTests": [], "marks": 0, "prompt": "
1. Do these vectors form a spanning set for $\\mathbb{R^4}$? [[0]]
\n2. Is $\\{\\mathbf{v}_1,\\;\\mathbf{v}_2,\\;\\mathbf{v}_3\\}$ a linearly independent set of vectors?[[1]]
", "type": "gapfill", "scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "sortAnswers": false, "useCustomName": false, "customName": "", "extendBaseMarkingAlgorithm": true, "gaps": [{"distractors": ["", ""], "unitTests": [], "displayColumns": 0, "marks": 0, "maxMarks": 0, "type": "1_n_2", "scripts": {}, "variableReplacements": [], "shuffleChoices": false, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "useCustomName": false, "customName": "", "minMarks": 0, "displayType": "radiogroup", "extendBaseMarkingAlgorithm": true, "matrix": [0, 1], "choices": ["Yes
", "No
"], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "showCellAnswerState": true}, {"unitTests": [], "displayColumns": 0, "marks": 0, "maxMarks": 0, "type": "1_n_2", "scripts": {}, "variableReplacements": [], "shuffleChoices": false, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "useCustomName": false, "customName": "", "minMarks": 0, "displayType": "radiogroup", "extendBaseMarkingAlgorithm": true, "matrix": "marking_matrix_independent", "choices": ["Yes
", "No
"], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "showCellAnswerState": true}], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}, {"unitTests": [], "marks": 0, "prompt": "Do there exist integers $p$ and $q$ such that the equation $\\mathbf{v}_{\\var{tt[0]}}=p\\mathbf{v}_{\\var{tt[1]}}+q\\mathbf{v}_{\\var{tt[2]}}$ holds?
\nIf you cannot find such an expression, input 0
for both $p$ and $q$.
$p=$ [[0]]
\n$q=$ [[1]]
", "type": "gapfill", "scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "sortAnswers": false, "useCustomName": false, "customName": "", "extendBaseMarkingAlgorithm": true, "gaps": [{"showFractionHint": true, "unitTests": [], "minValue": "p", "marks": 1, "correctAnswerStyle": "plain", "type": "numberentry", "scripts": {}, "variableReplacements": [], "correctAnswerFraction": false, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "useCustomName": false, "customName": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "maxValue": "p", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0}, {"showFractionHint": true, "unitTests": [], "minValue": "q", "marks": 1, "correctAnswerStyle": "plain", "type": "numberentry", "scripts": {}, "variableReplacements": [], "correctAnswerFraction": false, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "useCustomName": false, "customName": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "maxValue": "q", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0}], "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}], "name": "Simon's copy of Do three given vectors form a spanning set and are they linearly independent?", "rulesets": {"std": ["all", "!collectNumbers", "!noleadingminus"]}, "statement": "You are given the following three vectors in $\\mathbb{R}^4$:
\n\\[ \\mathbf{v}_1=\\var{v1}, \\quad \\mathbf{v}_2=\\var{v2}, \\quad \\mathbf{v}_3=\\var{v3}\\]
", "preamble": {"css": "", "js": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"r1": {"description": "", "definition": "rs[0]*random(-1,1)", "group": "Setup", "name": "r1", "templateType": "anything"}, "w_y": {"description": "Multiple of y in w
", "definition": "random(-2..2 except 0)", "group": "Setup", "name": "w_y", "templateType": "anything"}, "independent": {"description": "", "definition": "if(is_independent,'independent','dependent')", "group": "Strings", "name": "independent", "templateType": "anything"}, "x": {"description": "Linearly independent to y and z
", "definition": "vector(-r1+r2-r3,-r2+r3,r1-r3,-r1+r2)", "group": "Base vectors", "name": "x", "templateType": "anything"}, "marking_matrix_independent": {"description": "Marking matrix for the \"are these vectors linearly independent?\" question
", "definition": "if(t=4,[1,0],[0,1])", "group": "Marking", "name": "marking_matrix_independent", "templateType": "anything"}, "r2": {"description": "", "definition": "rs[1]*random(-1,1)", "group": "Setup", "name": "r2", "templateType": "anything"}, "y": {"description": "Linearly independent to x and z
", "definition": "vector(r2-r3,r1-r2+r3,-r1-r3,r1+r2)", "group": "Base vectors", "name": "y", "templateType": "anything"}, "q": {"description": "Amount of y to use to make up -w (the variable q asked for in part b)
", "definition": "if(t=4,0,w_y)", "group": "Solution", "name": "q", "templateType": "anything"}, "t": {"description": "Index of vector to write as a sum of multiples of the others. 4 if the vectors are linearly independent (in which case, the student will be asked to write v2 as a sum of multiples of v1 and v3)
", "definition": "if(is_independent,4,random(1,2,3))", "group": "Setup", "name": "t", "templateType": "anything"}, "w_x": {"description": "Multiple of z-y in w
", "definition": "random(-2..2 except 0)", "group": "Setup", "name": "w_x", "templateType": "anything"}, "is_independent": {"description": "Should v1,v2,v3 be linearly independent?
", "definition": "random(true,false)", "group": "Setup", "name": "is_independent", "templateType": "anything"}, "z": {"description": "Linearly independent to x and y
", "definition": "vector(-r2-r3,r1+r3,-r1+r2-r3,r1-r2)", "group": "Base vectors", "name": "z", "templateType": "anything"}, "v2": {"description": "", "definition": "switch(t=1,x,t=2,w,y)", "group": "Shown to the student", "name": "v2", "templateType": "anything"}, "tt": {"description": "The student is asked to write v_tt[0] as a sum of multiples of v_tt[1] and v_tt[2].
\ntt[0] is 2 if t=4, otherwise it's t. tt[1] and tt[2] are the two remaining indices, in increasing order.
", "definition": "[if(t=4,2,t),if(t=1,2,1),if(t=3,2,3)]", "group": "Shown to the student", "name": "tt", "templateType": "anything"}, "p": {"description": "Amount of x to use to make up -w
", "definition": "if(t=4,0,w_x)", "group": "Solution", "name": "p", "templateType": "anything"}, "test": {"description": "", "definition": "coeff_v1*v1 + coeff_v2*v2 + coeff_v3*v3", "group": "Ungrouped variables", "name": "test", "templateType": "anything"}, "w": {"description": "A linear combination of x and y
", "definition": "w_x*x + w_y*y", "group": "Base vectors", "name": "w", "templateType": "anything"}, "only": {"description": "", "definition": "if(t=4,\"only\", \"an infinite number of solutions, for example\")", "group": "Strings", "name": "only", "templateType": "anything"}, "rs": {"description": "Three distinct random numbers
", "definition": "shuffle(1..9)[0..3]", "group": "Setup", "name": "rs", "templateType": "anything"}, "r3": {"description": "", "definition": "rs[2]*random(-1,1)", "group": "Setup", "name": "r3", "templateType": "anything"}, "v1": {"description": "", "definition": "switch(t=1,w, x)", "group": "Shown to the student", "name": "v1", "templateType": "anything"}, "v3": {"description": "", "definition": "switch(t=3,w,t=4,z,y)", "group": "Shown to the student", "name": "v3", "templateType": "anything"}, "coeff_v1": {"description": "Coefficient of v1 in the equation a*v1 + b*v2 + c*v3 = 0
", "definition": "[1,-p,-p,0][t-1]", "group": "Solution", "name": "coeff_v1", "templateType": "anything"}, "coeff_v3": {"description": "Coefficient of v3 in the equation a*v1 + b*v2 + c*v3 = 0
", "definition": "[-q,-q,1,0][t-1]", "group": "Solution", "name": "coeff_v3", "templateType": "anything"}, "coeff_v2": {"description": "Coefficient of v2 in the equation a*v1 + b*v2 + c*v3 = 0
", "definition": "[-p,1,-q,0][t-1]", "group": "Solution", "name": "coeff_v2", "templateType": "anything"}, "cannot": {"description": "", "definition": "if(t=4,\"cannot \", \"\")", "group": "Strings", "name": "cannot", "templateType": "anything"}}, "advice": "1. These vectors cannot form a spanning set as you need at least 4 vectors to form a spanning set in $\\mathbb{R^4}$.
\n2. $\\mathbf{v}_1, \\; \\mathbf{v}_2 , \\; \\mathbf{v}_3$ is a linearly independent set if the only solution for \\[ a \\mathbf{v}_1 + b \\mathbf{v}_2 + c \\mathbf{v}_3 = \\var{vector(0,0,0,0)} \\qquad \\textbf{(1)}\\] is $a=0$, $b=0$, $c=0$.
\nIf there is any other solution then the set is linearly dependent. Note that if there is one other solution then there will be an infinite number of such solutions.
\nOn writing out the components given by equation (1), we see that we get the following four equations:
\n\\[\\begin{align} \\simplify[std]{{v1[0]} * a + {v2[0]} * b + {v3[0]} * c }&= 0\\\\ \\simplify[std]{{v1[1]} * a + {v2[1]} * b + {v3[1]} * c }&= 0\\\\ \\simplify[std]{{v1[2]} *a+ {v2[2]} * b + {v3[2]} * c }&= 0\\\\ \\simplify[std]{{v1[3]} *a+ {v2[3]} * b + {v3[3]} * c }&= 0\\end{align}\\]
\nWe see that on solving these equations that there is {only} the solution:
\n\\[a = \\var{coeff_v1}, \\; b=\\var{coeff_v2}, \\; c=\\var{coeff_v3}\\]
\nIt follows that $\\{\\mathbf{v}_1, \\; \\mathbf{v}_2 , \\; \\mathbf{v}_3\\}$ is a linearly {independent} set of vectors.
\n\nBecause the vectors $\\mathbf{v}_1$, $\\mathbf{v}_2$ and $\\mathbf{v}_3$ are linearly independent, input 0
for both $p$ and $q$.Rearrange equation (1) to give \\[ \\var{[a,b,c][tt[0]-1]}\\mathbf{v}_{\\var{tt[0]}} = -\\var{[a,b,c][tt[1]-1]}\\mathbf{v}_{\\var{tt[1]}} - \\var{[a,b,c][tt[2]-1]}\\mathbf{v}_{\\var{tt[2]}}\\] So, using the solution found above, $p=-\\var{[a,b,c][tt[1]-1]} = \\var{p}$ and $q =-\\var{[a,b,c][tt[2]-1]} = \\var{q}$.
Given the following three vectors $\\textbf{v}_1,\\;\\textbf{v}_2,\\;\\textbf{v}_3$ Find out whether they are a linearly independent set are not. Also if linearly dependent find the relationship $\\textbf{v}_{r}=p\\textbf{v}_{s}+q\\textbf{v}_{t}$ for suitable $r,\\;s,\\;t$ and integers $p,\\;q$.
", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {}, "ungrouped_variables": ["test"], "extensions": [], "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}