// Numbas version: exam_results_page_options {"name": "Generate a system of linear equations to solve", "extensions": ["linear-algebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Generate a system of linear equations to solve", "tags": [], "metadata": {"description": "

This question uses the linear algebra extension to generate a system of linear equations which can be solved.

\n

We want to produce an equation of the form $\\mathrm{A}\\mathbf{x} = \\mathbf{y}$, where $\\mathrm{A}$ and $\\mathbf{y}$ are given, and $\\mathbf{x}$ is to be found by the student.

\n

First, we generate a linearly independent set of vectors to form $\\mathrm{A}$, then freely pick the value of $\\mathbf{x}$, and calculate the corresponding $\\mathbf{y}$.

\n

To generate $\\mathrm{A}$, we generate more vectors we need, then pick a linearly independent subset of those using the subset_with_dimension function.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

\\begin{align}
\\simplify{ {system[0][0]}x + {system[0][1]}y + {system[0][2]}z } &= \\var{rhs[0]} \\\\
\\simplify{ {system[1][0]}x + {system[1][1]}y + {system[1][2]}z } &= \\var{rhs[1]} \\\\
\\simplify{ {system[2][0]}x + {system[2][1]}y + {system[2][2]}z } &= \\var{rhs[2]} \\\\
\\end{align}

", "advice": "", "rulesets": {}, "extensions": ["linear-algebra"], "variables": {"system": {"name": "system", "group": "Ungrouped variables", "definition": "let(\n vectors, repeat( repeat(random(-10..10),numvars), 2*numvars),\n matrix(subset_with_dimension(vectors,numvars,numvars))\n)", "description": "", "templateType": "anything"}, "numvars": {"name": "numvars", "group": "Ungrouped variables", "definition": "3", "description": "

The number of variables in the system of equations

", "templateType": "anything"}, "values": {"name": "values", "group": "Ungrouped variables", "definition": "vector(repeat(random(1..10),numvars))", "description": "", "templateType": "anything"}, "rhs": {"name": "rhs", "group": "Ungrouped variables", "definition": "system*values", "description": "

The right-hand side, $\\mathbf{y}$, of the equation $\\mathrm{A}\\mathbf{x} = \\mathbf{y}$.

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["numvars", "system", "values", "rhs"], "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": "

Solve the system of equations above.

\n

$x = $ [[0]]

\n

$y = $ [[1]]

\n

$z = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "$x$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "values[0]", "maxValue": "values[0]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "$y$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "values[1]", "maxValue": "values[1]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "$z$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "values[2]", "maxValue": "values[2]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}