// Numbas version: exam_results_page_options {"name": "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"}], "variables": {"w": {"templateType": "anything", "group": "Base vectors", "definition": "w_x*x + w_y*y", "description": "

A linear combination of x and y

", "name": "w"}, "x": {"templateType": "anything", "group": "Base vectors", "definition": "vector(-r1+r2-r3,-r2+r3,r1-r3,-r1+r2)", "description": "

Linearly independent to y and z

", "name": "x"}, "r1": {"templateType": "anything", "group": "Setup", "definition": "rs[0]*random(-1,1)", "description": "", "name": "r1"}, "only": {"templateType": "anything", "group": "Strings", "definition": "if(t=4,\"only\", \"amongst an infinite number of solutions,\")", "description": "", "name": "only"}, "z": {"templateType": "anything", "group": "Base vectors", "definition": "vector(-r2-r3,r1+r3,-r1+r2-r3,r1-r2)", "description": "

Linearly independent to x and y

", "name": "z"}, "tt": {"templateType": "anything", "group": "Shown to the student", "definition": "[if(t=4,2,t),if(t=1,2,1),if(t=3,2,3)]", "description": "

The student is asked to write v_tt[0] as a sum of multiples of v_tt[1] and v_tt[2].

\n

tt[0] is 2 if t=4, otherwise it's t. tt[1] and tt[2] are the two remaining indices, in increasing order.

", "name": "tt"}, "t": {"templateType": "anything", "group": "Setup", "definition": "if(is_independent,4,random(1,2,3))", "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)

", "name": "t"}, "coeff_v3": {"templateType": "anything", "group": "Solution", "definition": "[-q,-q,1,0][t-1]", "description": "

Coefficient of v3 in the equation a*v1 + b*v2 + c*v3 = 0

", "name": "coeff_v3"}, "coeff_v1": {"templateType": "anything", "group": "Solution", "definition": "[1,-p,-p,0][t-1]", "description": "

Coefficient of v1 in the equation a*v1 + b*v2 + c*v3 = 0

", "name": "coeff_v1"}, "rs": {"templateType": "anything", "group": "Setup", "definition": "shuffle(1..9)[0..3]", "description": "

Three distinct random numbers

", "name": "rs"}, "marking_matrix_independent": {"templateType": "anything", "group": "Marking", "definition": "if(t=4,[1,0],[0,1])", "description": "

Marking matrix for the \"are these vectors linearly independent?\" question

", "name": "marking_matrix_independent"}, "v2": {"templateType": "anything", "group": "Shown to the student", "definition": "switch(t=1,x,t=2,w,y)", "description": "", "name": "v2"}, "v1": {"templateType": "anything", "group": "Shown to the student", "definition": "switch(t=1,w, x)", "description": "", "name": "v1"}, "coeff_v2": {"templateType": "anything", "group": "Solution", "definition": "[-p,1,-q,0][t-1]", "description": "

Coefficient of v2 in the equation a*v1 + b*v2 + c*v3 = 0

", "name": "coeff_v2"}, "p": {"templateType": "anything", "group": "Solution", "definition": "if(t=4,0,w_x)", "description": "

Amount of x to use to make up -w

", "name": "p"}, "q": {"templateType": "anything", "group": "Solution", "definition": "if(t=4,0,w_y)", "description": "

Amount of y to use to make up -w (the variable q asked for in part b)

", "name": "q"}, "w_y": {"templateType": "anything", "group": "Setup", "definition": "random(-2..2 except 0)", "description": "

Multiple of y in w

", "name": "w_y"}, "cannot": {"templateType": "anything", "group": "Strings", "definition": "if(t=4,\"cannot \", \"\")", "description": "", "name": "cannot"}, "test": {"templateType": "anything", "group": "Ungrouped variables", "definition": "coeff_v1*v1 + coeff_v2*v2 + coeff_v3*v3", "description": "", "name": "test"}, "r3": {"templateType": "anything", "group": "Setup", "definition": "rs[2]*random(-1,1)", "description": "", "name": "r3"}, "is_independent": {"templateType": "anything", "group": "Setup", "definition": "random(true,false)", "description": "

Should v1,v2,v3 be linearly independent?

", "name": "is_independent"}, "r2": {"templateType": "anything", "group": "Setup", "definition": "rs[1]*random(-1,1)", "description": "", "name": "r2"}, "w_x": {"templateType": "anything", "group": "Setup", "definition": "random(-2..2 except 0)", "description": "

Multiple of z-y in w

", "name": "w_x"}, "y": {"templateType": "anything", "group": "Base vectors", "definition": "vector(r2-r3,r1-r2+r3,-r1-r3,r1+r2)", "description": "

Linearly independent to x and z

", "name": "y"}, "independent": {"templateType": "anything", "group": "Strings", "definition": "if(is_independent,'independent','dependent')", "description": "", "name": "independent"}, "v3": {"templateType": "anything", "group": "Shown to the student", "definition": "switch(t=3,w,t=4,z,y)", "description": "", "name": "v3"}}, "ungrouped_variables": ["test"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Do three given vectors form a spanning set and are they linearly independent?", "functions": {}, "showQuestionGroupNames": false, "parts": [{"prompt": "

1. Do these vectors form a spanning set for $\\mathbb{R^4}$? [[0]]  

\n

2. Is $\\{\\mathbf{v}_1,\\;\\mathbf{v}_2,\\;\\mathbf{v}_3\\}$ a linearly independent set of vectors?[[1]]

", "scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "displayColumns": 0, "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "matrix": [0, 1], "marks": 0}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "variableReplacementStrategy": "originalfirst", "matrix": "marking_matrix_independent", "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "marks": 0}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "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?

\n

If you cannot find such an expression, input 0 for both $p$ and $q$.

\n

$p=$ [[0]]

\n

$q=$ [[1]]

", "scripts": {}, "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "allowFractions": false, "type": "numberentry", "maxValue": "p", "minValue": "p", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "showPrecisionHint": false}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "allowFractions": false, "type": "numberentry", "maxValue": "q", "minValue": "q", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "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}\\]

", "tags": ["checked2015", "dependent vectors", "linear algebra", "linear combination of vectors", "linear dependence", "linear equations", "linear independence", "linearly dependent vectors", "linearly independent", "MAS2223", "solving linear equations", "vectors"], "rulesets": {"std": ["all", "!collectNumbers", "!noleadingminus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

11/02/2013:

\n

Finished first draft. Need to resolve the display of row vectors etc.

\n

Display of linear equations difficult to format e.g. variables under one another as got to use \\simplify where there are randomised coefficients. 

", "licence": "Creative Commons Attribution 4.0 International", "description": "

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$.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

a)

\n

1. These vectors cannot form a spanning set as you need at least 4 vectors to form a spanning set in $\\mathbb{R^4}$.

\n

2. $\\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$.

\n

If 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.

\n

On 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}\\]

\n

We 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}\\]

\n

It follows that $\\{\\mathbf{v}_1, \\; \\mathbf{v}_2 , \\; \\mathbf{v}_3\\}$ is a linearly {independent} set of vectors.

\n

b)

\n

Because 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}$.

\n

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}