// Numbas version: exam_results_page_options {"name": "John's copy of Find a basis given a spanning set of vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "advice": "

Clearly $\\textbf{v}_1$ is always in the required basis as it is non-zero.

\n

$\\textbf{v}_2$ is {nt2} in the required basis as it is {ont2} a multiple of $\\textbf{v}_1$.

\n

$\\textbf{v}_3$ is {nt3} in the required basis as it is {ont3} a linear  combination of $\\textbf{v}_1$ and $\\textbf{v}_2$.

\n

$\\textbf{v}_4$ is {nt4} in the required basis as it is {ont4} a linear  combination of previous vectors.

\n

{message4}

\n

$\\textbf{v}_5$ is {nt5} in the required basis as it is {ont5} a linear  combination of previous vectors.

\n

{message5}

\n

$\\textbf{v}_6$ is {nt6} in the required basis as it is {ont6} a linear  combination of previous vectors.

\n

 

", "ungrouped_variables": ["mm5", "mm4", "nt3", "mm6", "nt5", "al", "ga1", "mm2", "ga", "ep", "ont3", "ont2", "ont6", "ont5", "ont4", "message5", "message4", "be1", "tmm", "be", "nt2", "nt4", "v1", "v2", "v3", "v4", "mm3", "v6", "nt6", "b", "c5", "al1", "a", "c", "p1", "mm", "q", "p2", "r", "u", "t", "v", "y", "x", "z", "v5"], "preamble": {"js": "", "css": ""}, "parts": [{"variableReplacements": [], "prompt": "

Your task is to find a basis for $\\mathbb{R^4}$ by finding a linearly independent subset of these vectors.

\n

Start from $\\textbf{v}_1$ and work through each vector in turn.

\n

Determine if a vector is a linear combination of the previous vectors in the list.

\n

If it is not such a linear combination then include it in the basis by choosing Yes, otherwise choose No.

\n

Note that if a vector $\\textbf{v}_i$ for $i=2,\\ldots 5$ is a linear combination of the previous vectors in the list then it will satisfy a simple relation of the form  $ \\textbf{v}_i=a\\textbf{v}_j +b\\textbf{v}_k$ where $a$ can be $0,\\;1$  or $-1$  similarly for $b$.

\n

When you get to $\\textbf{v}_6$ it will be obvious if it is in the spanning set or not. (why?)

\n

[[0]]  

\n

 

", "showFeedbackIcon": true, "gaps": [{"variableReplacements": [], "matrix": "mm", "choices": ["$\\textbf{v}_1$", "$\\textbf{v}_2$", "$\\textbf{v}_3$", "$\\textbf{v}_4$", "$\\textbf{v}_5$", "$\\textbf{v}_6$"], "minMarks": 0, "shuffleAnswers": false, "displayType": "radiogroup", "maxAnswers": 0, "marks": 0, "type": "m_n_x", "shuffleChoices": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "minAnswers": 0, "layout": {"type": "all", "expression": ""}, "answers": ["Yes", "No"], "maxMarks": 0, "scripts": {}, "warningType": "none"}], "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "type": "gapfill"}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given $6$ vectors in $\\mathbb{R^4}$ and given that they span $\\mathbb{R^4}$ find a  basis.

"}, "variable_groups": [], "extensions": [], "tags": [], "functions": {}, "variables": {"c": {"definition": "if(c5+a+b=0, if(c5+1=0,c5+2,c5+1),c5)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "c"}, "ont3": {"definition": "if(mm3[1]=1,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ont3"}, "ga1": {"definition": "if(al1*be1=0,random(1,-1),0)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ga1"}, "c5": {"definition": "random(-3..3 except 0)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "c5"}, "a": {"definition": "random(-3..3 except 0)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a"}, "q": {"definition": "list(al*vector(x)+be*vector(y))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "q"}, "u": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "u"}, "nt4": {"definition": "if(mm4[0]=1,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "nt4"}, "x": {"definition": "[-a+b-c,-b+c,a-c,-a+b]", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "x"}, "z": {"definition": "[-b-c,a+c,-a+b-c,a-b]", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "z"}, "ont6": {"definition": "if(mm6[1]=1,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ont6"}, "v3": {"definition": "if(u>6,z,if(u>3,p1,y))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "v3"}, "ont4": {"definition": "if(mm4[1]=1,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ont4"}, "ep": {"definition": "if(al=0 and be=0,random(1,-1),if(al=0 and ga=0,random(1,-1), if(be=0 and ga=0,random(1,-1),0)))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ep"}, "r": {"definition": "list(al*vector(x)+be*vector(y)+ga*vector(z))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "r"}, "v": {"definition": "[-b+c,a-c,-a+b,a-b+c] ", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "v"}, "y": {"definition": "[b-c,a-b+c,-a-c,a+b]", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "y"}, "be1": {"definition": "random(0,1,-1)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "be1"}, "ont5": {"definition": "if(mm5[1]=1,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ont5"}, "mm3": {"definition": "if(u=4 or u=5 or u=6,[0,1], [1,0])", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "mm3"}, "nt6": {"definition": "if(mm6[0]=1,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "nt6"}, "v6": {"definition": "if(u>7 or u=3 or u=6, p2, v)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "v6"}, "message5": {"definition": "if(u=2 or u=5 or u=7, \"There are three linearly independent vectors at this stage and you know that the set is spanning, so the 6th vector must be in the basis.\",if(u=3 or u=6 or u=8, \"There are now 4 linearly independent vectors, so the 6th vector is not in the basis.\",\" \"))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "message5"}, "nt5": {"definition": "if(mm5[0]=1,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "nt5"}, "t": {"definition": "list(ep*vector(v))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "t"}, "p2": {"definition": "\n if(u=1 or u=4,list(al1*vector(x)+be1*vector(y)),\n if(u=2 or u=5 or u=7,list(al1*vector(x)+be1*vector(y)+ga1*vector(z)),\n [random(0..2),random(-1,3),random(0..2),random(0..2)]))\n ", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "p2"}, "v1": {"definition": "x", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "v1"}, "nt2": {"definition": "if(mm2[0]=0.5,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "nt2"}, "tmm": {"definition": "list(transpose(matrix(mm)))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "tmm"}, "b": {"definition": "random(-3..3 except 0)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b"}, "be": {"definition": "random(0,1,-1)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "be"}, "mm": {"definition": "[[0.5,0],mm2,mm3,mm4,mm5,mm6]", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "mm"}, "nt3": {"definition": "if(mm3[0]=1,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "nt3"}, "p1": {"definition": "if(u<4,list(al*vector(x)),if(u<7,q,if(u<9,r,t)))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "p1"}, "mm4": {"definition": "if(u=2 or u=3 or u=5 or u=6 or u=9,[1,0], [0,1])", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "mm4"}, "message4": {"definition": "if(u=1 or u=4, \"Since at this stage there are only 2 linearly independent vectors and you know that the set is spanning, you can immediately say yes to the next two as they must be in the basis.\",if(u=9,\"There are now 4 linearly independent vectors and so you can answer no to the next two.\",\" \"))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "message4"}, "v4": {"definition": "if(u=7 or u=8,p1,if(u=9,v,if(u=4 or u=1,p2,z)))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "v4"}, "mm5": {"definition": "if(u=2 or u=5 or u=7 or u=9,[0,1], [1,0])", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "mm5"}, "ont2": {"definition": "if(mm2[1]=0.5,\"\", \"not\")", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ont2"}, "v2": {"definition": "if(u>3,y,p1)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "v2"}, "mm6": {"definition": "if(u=3 or u=6 or u=8 or u=9,[0,1], [1,0])", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "mm6"}, "mm2": {"definition": "switch(u>3,[0.5,0],[0,0.5])", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "mm2"}, "ga": {"definition": "if(al*be=0, random(1,-1),0)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ga"}, "al": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "al"}, "al1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "al1"}, "v5": {"definition": "if(u=1 or u=4,z,if(u =2 or u=5 or u=7,p2, if(u=9,p1,v)))", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "v5"}}, "name": "John's copy of Find a basis given a spanning set of vectors", "statement": "

Consider the following set of $6$ vectors in $\\mathbb{R^4}$ . . 

\n

\\[\\begin{align} \\textbf{v}_1&=\\var{rowvector(v1)}\\\\ \\textbf{v}_2&=\\var{rowvector(v2)}\\\\ \\textbf{v}_3&=\\var{rowvector(v3)}\\\\ \\textbf{v}_4&=\\var{rowvector(v4)}\\\\ \\textbf{v}_5&=\\var{rowvector(v5)}\\\\ \\textbf{v}_6&=\\var{rowvector(v6)}\\end{align}\\] 

\n

You are given that this set of vectors is a spanning set for  $\\mathbb{R^4}$

", "type": "question", "contributors": [{"name": "Mohamed Mehbali", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1764/"}, {"name": "John Steele", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2218/"}]}]}], "contributors": [{"name": "Mohamed Mehbali", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1764/"}, {"name": "John Steele", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2218/"}]}