// Numbas version: finer_feedback_settings
{"name": "Linear graphs: find a line 2 - perpendicular", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Linear graphs: find a line 2 - perpendicular", "tags": ["Category: Linear Graphs"], "metadata": {"description": "", "licence": "None specified"}, "statement": "
Find the equation of a line given a point and a perpendicular line.
", "advice": "{apps}
Rearrange the given equation to find the gradient:
\n\\[ \\simplify[all]{{a}x + {b}y + {c} = 0} \\]
\n\\[ y = \\simplify[FractionNumbers]{{-a/b}x-{c/b}} \\]
\nTherefore the gradient, $m_1$, is equal to $\\simplify[FractionNumbers]{{m}}$.
Since we want the {pop} line, then the gradient of the new line, $m_2$, will {popgrad}, and therefore $m_2 = \\simplify[FractionNumbers]{{newm}}$.
{apps2}
\nWe can now take the equation $y = mx + c$, and subsitute in $m_2$ along with $(x,y) = (\\var{x},\\var{y})$, to give:
\\[ \\var{y} = \\simplify[FractionNumbers]{{newm}} \\times \\simplify[FractionNumbers]{{x}} + c \\]
and rearrange to calculate
\n\\[ c = \\simplify[FractionNumbers]{{y} - {newm}*{x}} \\]
\\[ c = \\simplify[FractionNumbers]{{y - newm*x}} \\].
Therefore
\\[y = \\simplify[FractionNumbers]{{newm}*x +{y - newm*x}}\\].
", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"pops": {"name": "pops", "group": "Ungrouped variables", "definition": "0", "description": "", "templateType": "number", "can_override": false}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..5 except 0 except a)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "-a/b", "description": "", "templateType": "anything", "can_override": false}, "pop": {"name": "pop", "group": "Ungrouped variables", "definition": "if(pops=1, \"parallel\", \"perpendicular\")", "description": "", "templateType": "anything", "can_override": false}, "l1": {"name": "l1", "group": "Ungrouped variables", "definition": "vector(1,m+d)", "description": "", "templateType": "anything", "can_override": false}, "l2": {"name": "l2", "group": "Ungrouped variables", "definition": "vector(2,2m+d)", "description": "", "templateType": "anything", "can_override": false}, "point": {"name": "point", "group": "Ungrouped variables", "definition": "vector(x,y)", "description": "", "templateType": "anything", "can_override": false}, "apps": {"name": "apps", "group": "Ungrouped variables", "definition": "geogebra_applet(\n 600,600,\n [\n A: [\n definition: point,\n label_visible: false,\n visible: true\n ],\n \n P:[\n definition: l1,\n label_visible: false,\n visible: false\n ],\n \n Q:[\n definition: l2,\n label_visible: false,\n visible: false\n ],\n\n line: [\n definition: \"Line(P,Q)\",\n label_visible: false\n ]\n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "newm": {"name": "newm", "group": "Ungrouped variables", "definition": "if(pops=1,m,-1/m)", "description": "", "templateType": "anything", "can_override": false}, "newc": {"name": "newc", "group": "Ungrouped variables", "definition": "y-newm*x", "description": "", "templateType": "anything", "can_override": false}, "apps2": {"name": "apps2", "group": "Ungrouped variables", "definition": "geogebra_applet(\n 600,600,\n [\n A: [\n definition: point,\n label_visible: false,\n visible: true\n ],\n \n P:[\n definition: l1,\n label_visible: false,\n visible: false\n ],\n \n Q:[\n definition: l2,\n label_visible: false,\n visible: false\n ],\n\n line: [\n definition: \"Line(P,Q)\",\n label_visible: false\n ],\n \n R: [\n definition: vec,\n label_visible: false,\n visible: false\n ],\n \n \n answer:[\n definition: \"Line(A,R)\"\n ]\n \n \n \n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "popgrad": {"name": "popgrad", "group": "Ungrouped variables", "definition": "if(pops=0,\"be the inverse reciprocal\",\"have equal gradient\")", "description": "", "templateType": "anything", "can_override": false}, "vec": {"name": "vec", "group": "Ungrouped variables", "definition": "vector(1,newm+newc)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "-c/b", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "gcd(a,b)=1", "maxRuns": 100}, "ungrouped_variables": ["pops", "x", "y", "a", "b", "c", "m", "pop", "l1", "l2", "point", "apps", "newm", "newc", "apps2", "popgrad", "vec", "d"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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, "prompt": "Find the equation of the line {pop} to
$\\simplify[all]{{a}x + {b}y + {c} = 0}$,
passing through the point $(\\var{x},\\var{y})$.
", "answer": "y = {newm}*x + {newc}", "answerSimplification": "fractionNumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}]}]}], "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}]}