// Numbas version: finer_feedback_settings {"name": "General linear combinations of standard basis vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "General linear combinations of standard basis vectors", "tags": [], "metadata": {"description": "
Abstract linear combinations. \"Surreptitious\" preview of bases and spanning sets, but not explicitely mentioned. There is no randomisation because it is just an abstract question. For counter-examples, any valid counter-example is accepted.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "This question is about general linear combinations.
", "advice": "Part a) Whatever real numbers the entries \\(x\\) and \\(y\\) are, we can use those numbers as coefficients. So in general, we have \\(\\begin{pmatrix}x\\\\y\\end{pmatrix}=x\\begin{pmatrix}1\\\\0\\end{pmatrix}+y\\begin{pmatrix}0\\\\1\\end{pmatrix}\\).
\nPart b) Similarly, we have \\(\\begin{pmatrix}x_1\\\\x_2\\\\x_3\\\\x_4\\end{pmatrix}=x_1\\var{latex(e1)}+x_2\\var{latex(e2)}+x_3\\var{latex(e3)} + x_4\\var{latex(e4)}\\). Therefore, there is no counterexample.
\nPart c) We cannot write any vector in \\(\\mathbb{R}^4\\) as a linear combination of just the first three vectors: any vector which has a non-zero fourth entry cannot be written like this, because
\n\\[ x_1\\var{latex(e1)}+x_2\\var{latex(e2)}+x_3\\var{latex(e3)} =\\begin{pmatrix}x_1\\\\x_2\\\\x_3\\\\0\\end{pmatrix}.\\]
\nWhatever we choose for \\(x_1,\\ x_2,\\ x_3\\), we can never get a non-zero entry in the fourth position. For example, \\(\\begin{pmatrix}0\\\\0\\\\0\\\\1\\end{pmatrix}\\) is a counter-example. Any vector with non-zero fourth entry is accepted as a correct counter-example.
", "rulesets": {}, "extensions": [], "variables": {"v1": {"name": "v1", "group": "Ungrouped variables", "definition": "vector((repeat(random(1..5),2)))", "description": "", "templateType": "anything"}, "v2": {"name": "v2", "group": "Ungrouped variables", "definition": "vector((repeat(random(1..5),2)))", "description": "", "templateType": "anything"}, "w1": {"name": "w1", "group": "Ungrouped variables", "definition": "vector(sqrt(n),pi)", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..5 except 4)", "description": "", "templateType": "anything"}, "w2": {"name": "w2", "group": "Ungrouped variables", "definition": "vector(-w1[0]/b,pi)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything"}, "mu1": {"name": "mu1", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "mu2": {"name": "mu2", "group": "Ungrouped variables", "definition": "b*mu1", "description": "", "templateType": "anything"}, "e1": {"name": "e1", "group": "Ungrouped variables", "definition": "\"\\\\begin\\{pmatrix\\}1\\\\\\\\0\\\\\\\\0\\\\\\\\0\\\\end\\{pmatrix\\}\"", "description": "first standard basis vector
", "templateType": "anything"}, "e2": {"name": "e2", "group": "Ungrouped variables", "definition": "\"\\\\begin\\{pmatrix\\}0\\\\\\\\1\\\\\\\\0\\\\\\\\0\\\\end\\{pmatrix\\}\"", "description": "", "templateType": "anything"}, "e3": {"name": "e3", "group": "Ungrouped variables", "definition": "\"\\\\begin\\{pmatrix\\}0\\\\\\\\0\\\\\\\\1\\\\\\\\0\\\\end\\{pmatrix\\}\"", "description": "", "templateType": "anything"}, "e4": {"name": "e4", "group": "Ungrouped variables", "definition": "\"\\\\begin\\{pmatrix\\}0\\\\\\\\0\\\\\\\\0\\\\\\\\1\\\\end\\{pmatrix\\}\"", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "v1<>v2", "maxRuns": 100}, "ungrouped_variables": ["v1", "v2", "w1", "w2", "n", "b", "mu1", "mu2", "e1", "e2", "e3", "e4"], "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": "Can you write any vector \\(\\begin{pmatrix}x\\\\y\\end{pmatrix}\\in \\mathbb{R}^2\\) as a linear combination of the vectors \\(\\begin{pmatrix}1\\\\0\\end{pmatrix},\\ \\begin{pmatrix}0\\\\1\\end{pmatrix}\\)?
\nIf yes, fill in the coefficients. If no, write NA
into the gaps.
\\(\\begin{pmatrix}x\\\\y\\end{pmatrix}=\\ \\) [[0]] \\(\\begin{pmatrix}1\\\\0\\end{pmatrix} + \\) [[1]] \\(\\begin{pmatrix}0\\\\1\\end{pmatrix}\\).
", "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": "x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"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": "y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "y", "value": ""}]}], "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": "Can you write any vector \\(\\begin{pmatrix}x_1\\\\x_2\\\\x_3\\\\x_4\\end{pmatrix}\\in \\mathbb{R}^4\\) as a linear combination of the vectors \\(\\var{latex(e1)},\\ \\begin{pmatrix}0\\\\1\\\\0\\\\0\\end{pmatrix},\\ \\begin{pmatrix}0\\\\0\\\\1\\\\0\\end{pmatrix},\\ \\begin{pmatrix}0\\\\0\\\\0\\\\1\\end{pmatrix}\\)?
\nIf yes, fill in the coefficients. If no, write NA
into the gaps.
\\(\\begin{pmatrix}x_1\\\\x_2\\\\x_3\\\\x_4\\end{pmatrix}=\\ \\) [[0]] \\(\\var{latex(e1)}+ \\) [[1]] \\(\\var{latex(e2)}+\\) [[2]] \\(\\var{latex(e3)}+ \\)[[3]]\\(\\var{latex(e4)} \\).
\nIf you decided that not every vector \\(\\begin{pmatrix}x_1\\\\x_2\\\\x_3\\\\x_4\\end{pmatrix}\\in \\mathbb{R}^4\\) can be written as a linear combination as above, give an example of a vector which cannot be written like this. Write it into the gap as vector(1,2,3,4)
with the numbers substituted by your chosen entries. (The marking algorithm will not understand fractions.) If you did provide general coefficients above, then write NA
into the gap.
Counterexample: [[4]]
\n", "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, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": true, "answer": "x1", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x1", "value": ""}]}], "answer": "x_1", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x_1", "value": ""}]}, {"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, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": true, "answer": "x2", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x2", "value": ""}]}], "answer": "x_2", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x_2", "value": ""}]}, {"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, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": true, "answer": "x3", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x3", "value": ""}]}], "answer": "x_3", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x_3", "value": ""}]}, {"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, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": true, "answer": "x4", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x4", "value": ""}]}], "answer": "x_4", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x_4", "value": ""}]}, {"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": "NA", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "mustmatchpattern": {"pattern": "vector($n,$n,$n,$n)`|NA", "partialCredit": 0, "message": "You should input a vector with four entries, orNA
.", "nameToCompare": ""}, "valuegenerators": [{"name": "na", "value": ""}]}], "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": "Can you write any vector \\(\\begin{pmatrix}x_1\\\\x_2\\\\x_3\\\\x_4\\end{pmatrix}\\in \\mathbb{R}^4\\) as a linear combination of just the first three vectors \\(\\var{latex(e1)},\\ \\begin{pmatrix}0\\\\1\\\\0\\\\0\\end{pmatrix},\\ \\begin{pmatrix}0\\\\0\\\\1\\\\0\\end{pmatrix}\\)?
\nIf yes, fill in the coefficients. If no, write NA
into the gaps.
\\(\\begin{pmatrix}x_1\\\\x_2\\\\x_3\\\\x_4\\end{pmatrix}=\\ \\) [[0]] \\(\\var{latex(e1)}+ \\) [[1]] \\(\\var{latex(e2)}+\\) [[2]]\\(\\var{latex(e3)}\\).
\nIf you decided that not every vector \\(\\begin{pmatrix}x_1\\\\x_2\\\\x_3\\\\x_4\\end{pmatrix}\\in \\mathbb{R}^4\\) can be written as a linear combination as above, give an example of a vector which cannot be written like this. Write it into the gap as vector(1,2,3,4)
with the numbers substituted by your chosen entries. (The marking algorithm will not understand fractions.) If you did provide general coefficients above, then write NA
into the gap.
Counter-example: [[3]]
", "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": "NA", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "na", "value": ""}]}, {"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": "NA", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "na", "value": ""}]}, {"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": "NA", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "na", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "is_NA (Is the student's entry NA?):\n matches(studentExpr,\"NA\")\n\nis_vector (Is the student's entry a vector with four entries?):\n matches(studentExpr,\"vector(`+- $n,`+- $n,`+- $n,`+- $n)\")\n\nstudentVector (Make the student Entries into a vector):\n if(is_vector,eval(studentExpr),false)\n\nhas_non_zero_fourth_entry (Does the student's answer have non-zero fourth entry?):\n correctif(is_vector and studentVector[3]<>0)\n\nmark:\n apply(studentExpr);\n apply(forbiddenStringsPenalty);\n apply(requiredStringsPenalty);\n apply(failMatchPattern);\n if(is_NA,\n incorrect(\"Your answer is incorrect.\"); end(),\n apply(has_non_zero_fourth_entry))", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "vector(0,0,0,1)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "mustmatchpattern": {"pattern": "vector($n,$n,$n,$n)`|NA", "partialCredit": 0, "message": "You should input a vector with four entries, orNA
.", "nameToCompare": ""}, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}]}], "contributors": [{"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}