// Numbas version: finer_feedback_settings {"name": "cormac's copy of Katherine's copy of Q2 Given a line, Coordinate Geometry", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

 $\\var{l[0]}x + \\var{l[1]}y = \\var{l[2]}$

\n

a) L intersects the x axis when $y=0$

\n

$\\var{l[0]}x + \\var{l[1]}(0) = \\var{l[2]}$

\n

$\\var{l[0]}x = \\var{l[2]}$

\n

$x = \\frac{\\var{l[2]}}{\\var{l[0]}}$

\n

Point $= (\\frac{\\var{l[2]}}{\\var{l[0]}},0)$

\n

b) L intersects the y axis when $ x=0$

\n

 $\\var{l[0]}0 + \\var{l[1]}y = \\var{l[2]}$

\n

 $ \\var{l[1]}y = \\var{l[2]}$

\n

 $ y = \\frac{\\var{l[2]}}{\\var{l[1]}}$

\n

Point $= (0,\\frac{\\var{l[2]}}{\\var{l[1]}})$ 

\n

c) To find the equation of a line we use the formula $y - y_1 = m(x - x_1)$, where $(x_1,y_1)$ is a point on the line and $m$ is the slope.

\n

We are given the point c($\\var{px},\\var{py}$). So, we need to find the slope $m$.

\n

Slope of L  = $ -\\frac{\\var{l[0]}}{\\var{l[1]}}$. Since the line is perpendicular to L the product of the slopes is -1. i.e. $m\\times (-\\frac{\\var{l[0]}}{\\var{l[1]}})) = -1 $

\n

$m =  \\frac{\\var{l[1]}}{\\var{l[0]}} $

\n

$Y - (\\var{py}) = \\frac{\\var{l[1]}}{\\var{l[0]}}(X - (\\var{px}))$

\n

Rearranging we get

\n

$Y=\\frac{{\\var{l[1]}}}{{\\var{l[0]}}}x+\\frac{\\var{constant4a}}{\\var{l[0]}}$

\n

d) Using the slope of L from part c and the formula $y - y_1 = m(x - x_1)$, where $(x_1,y_1)$ is the point d$(\\var{px1},\\var{py1})$.

\n

Since the line is parallel to L the slope is the same.

\n

slope of L(m) = $ -\\frac{\\var{l[0]}}{\\var{l[1]}}$

\n

$y - (\\var{py1}) =  -\\frac{\\var{l[0]}}{\\var{l[1]}}$(x - \\var{px1})$

\n

 $y= -\\frac{\\var{l[0]}}{\\var{l[1]}}x +  \\var{constanta}/\\var{l[1]}$

\n

e) Using the formula $(\\frac{x_1+x_2}{2},\\frac{y_1+y_2}{2})$, where $(x_1,y_1) = c(\\var{px},\\var{py})$ and $(x_2,y_2) = d(\\var{px1},\\var{py1})$.

\n

$(\\frac{\\var{px}+\\var{px1}}{2},\\frac{\\var{py}+\\var{py1}}{2}) = (\\var{x5},\\var{y5})$

\n

f) Using the formula dis = $\\sqrt{(x_2-x_1)^2 + (y_2-y-1)^2}$, where $(x_1,y_1) = c(\\var{px},\\var{py})$ and $(x_2,y_2) = d(\\var{px1},\\var{py1})$.

\n

$\\sqrt{(\\var{px1}-\\var{px})^2 + (\\var{py1})-(\\var{py})))^2}={\\var{dis}}$

\n

Then round to 2 decimal places.

\n

", "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": [], "preamble": {"js": "", "css": ""}, "rulesets": {}, "parts": [{"type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "marks": 0, "showFeedbackIcon": true, "gaps": [{"expectedvariablenames": [], "vsetrange": [0, 1], "marks": 1, "checkvariablenames": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "variableReplacements": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answersimplification": "all", "showpreview": true, "answer": "{l[2]}/{l[0]}"}, {"allowFractions": false, "variableReplacements": [], "marks": 1, "mustBeReduced": false, "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "minValue": "0", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerFraction": false, "correctAnswerStyle": "plain", "maxValue": "0", "mustBeReducedPC": 0}], "scripts": {}, "prompt": "

Find the point a, where L intersects the x-axis.

\n

Give answer in fraction form.

\n

a = ([[0]] , [[1]])

", "variableReplacementStrategy": "originalfirst"}, {"type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "marks": 0, "showFeedbackIcon": true, "gaps": [{"allowFractions": false, "variableReplacements": [], "marks": 1, "mustBeReduced": false, "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "minValue": "0", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerFraction": false, "correctAnswerStyle": "plain", "maxValue": "0", "mustBeReducedPC": 0}, {"expectedvariablenames": [], "vsetrange": [0, 1], "marks": 1, "checkvariablenames": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "variableReplacements": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answersimplification": "all", "showpreview": true, "answer": "{l[2]}/{l[1]}"}], "scripts": {}, "prompt": "

Find the point b, where L intersects the y-axis.

\n

Give answer in fraction form.

\n

a = ([[0]] , [[1]])

", "variableReplacementStrategy": "originalfirst"}, {"type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "marks": 0, "showFeedbackIcon": true, "gaps": [{"expectedvariablenames": [], "vsetrange": [0, 1], "marks": 1, "checkvariablenames": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "variableReplacements": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answersimplification": "ALL", "showpreview": true, "answer": "{l[1]}/{l[0]}"}, {"expectedvariablenames": [], "vsetrange": [0, 1], "marks": 1, "checkvariablenames": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "variableReplacements": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answersimplification": "all", "showpreview": true, "answer": "{constant4a}/{l[0]}"}], "scripts": {}, "prompt": "

Find the equation of the line perpendicular to L and passing through c($\\var{px},\\var{py}$).

\n

Give answer in fraction form.

\n

y = [[0]]x + [[1]]

", "variableReplacementStrategy": "originalfirst"}, {"type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "marks": 0, "showFeedbackIcon": true, "gaps": [{"expectedvariablenames": [], "vsetrange": [0, 1], "marks": 1, "checkvariablenames": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "variableReplacements": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answersimplification": "all", "showpreview": true, "answer": "-{l[0]}/{l[1]}"}, {"expectedvariablenames": [], "vsetrange": [0, 1], "marks": 1, "checkvariablenames": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "variableReplacements": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answersimplification": "all", "showpreview": true, "answer": "{constanta}/{l[1]}"}], "scripts": {}, "prompt": "

Find the equation of the line parallel to L and passing through d($\\var{px1},\\var{py1}$).

\n

Give answer in fraction form.

\n

y = [[0]]x + [[1]]

", "variableReplacementStrategy": "originalfirst"}, {"type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "marks": 0, "showFeedbackIcon": true, "gaps": [{"allowFractions": true, "variableReplacements": [], "marks": 1, "mustBeReduced": false, "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "minValue": "x5", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerFraction": true, "correctAnswerStyle": "plain", "maxValue": "x5", "mustBeReducedPC": 0}, {"allowFractions": true, "variableReplacements": [], "marks": 1, "mustBeReduced": false, "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "minValue": "y5", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "correctAnswerFraction": true, "correctAnswerStyle": "plain", "maxValue": "y5", "mustBeReducedPC": 0}], "scripts": {}, "prompt": "

Find the mid-point of the line segment cd.

\n

Give answer to 2 decimal points.

\n

([[0]],[[1]])

", "variableReplacementStrategy": "originalfirst"}, {"type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "marks": 0, "showFeedbackIcon": true, "gaps": [{"allowFractions": false, "variableReplacements": [], "marks": 1, "precision": "2", "precisionPartialCredit": 0, "scripts": {}, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "showPrecisionHint": false, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "type": "numberentry", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showFeedbackIcon": true, "minValue": "{dis}", "correctAnswerStyle": "plain", "strictPrecision": false, "maxValue": "{dis}", "mustBeReducedPC": 0}], "scripts": {}, "prompt": "

Calculate the distance from c to d.

\n

Give answer to 2 decimal places.

\n

ans = [[0]]

", "variableReplacementStrategy": "originalfirst"}], "name": "cormac's copy of Katherine's copy of Q2 Given a line, Coordinate Geometry", "variables": {"constant1": {"templateType": "anything", "name": "constant1", "group": "Ungrouped variables", "description": "", "definition": "constant/-gcd"}, "p_b": {"templateType": "anything", "name": "p_b", "group": "Ungrouped variables", "description": "", "definition": "l[2]/l[1]"}, "x": {"templateType": "anything", "name": "x", "group": "Ungrouped variables", "description": "", "definition": "(neg[2]-pos[0])"}, "constant4": {"templateType": "anything", "name": "constant4", "group": "iii", "description": "", "definition": "constant4a/gcd4"}, "y4a": {"templateType": "anything", "name": "y4a", "group": "iii", "description": "", "definition": "1000"}, "x1": {"templateType": "anything", "name": "x1", "group": "Ungrouped variables", "description": "", "definition": "x/gcd"}, "gcd4": {"templateType": "anything", "name": "gcd4", "group": "iii", "description": "", "definition": "gcd(gcd4a,gcd4b)"}, "x4": {"templateType": "anything", "name": "x4", "group": "iii", "description": "", "definition": "l[1]/l[0]"}, "gcd4b": {"templateType": "anything", "name": "gcd4b", "group": "iii", "description": "", "definition": "gcd(constant4a,y4a)"}, "ya": {"templateType": "anything", "name": "ya", "group": "iv", "description": "", "definition": "l_s"}, "p_a": {"templateType": "anything", "name": "p_a", "group": "Ungrouped variables", "description": "", "definition": "l[2]/l[0]"}, "l": {"templateType": "anything", "name": "l", "group": "Ungrouped variables", "description": "", "definition": "shuffle(2..6)[0..3]"}, "gcd1": {"templateType": "anything", "name": "gcd1", "group": "Ungrouped variables", "description": "", "definition": "gcd(constant,x)"}, "gcd2": {"templateType": "anything", "name": "gcd2", "group": "Ungrouped variables", "description": "", "definition": "gcd(constant,y)"}, "neg": {"templateType": "anything", "name": "neg", "group": "Ungrouped variables", "description": "", "definition": "shuffle(-4..-1)[0..3]"}, "constanta": {"templateType": "anything", "name": "constanta", "group": "iv", "description": "", "definition": "(px1*l[0])-(l[1]*-py1)"}, "m": {"templateType": "anything", "name": "m", "group": "iii", "description": "", "definition": "-1/l_s"}, "px": {"templateType": "anything", "name": "px", "group": "iii", "description": "", "definition": "random(2..6)"}, "gcd4a": {"templateType": "anything", "name": "gcd4a", "group": "iii", "description": "", "definition": "gcd(constant4a,x4a)"}, "px1": {"templateType": "anything", "name": "px1", "group": "iv", "description": "", "definition": "random(2..8)"}, "y5": {"templateType": "anything", "name": "y5", "group": "v", "description": "", "definition": "(py+py1)/2"}, "x5": {"templateType": "anything", "name": "x5", "group": "v", "description": "", "definition": "(px+px1)/2"}, "y1": {"templateType": "anything", "name": "y1", "group": "Ungrouped variables", "description": "", "definition": "y/gcd"}, "pos": {"templateType": "anything", "name": "pos", "group": "Ungrouped variables", "description": "", "definition": "shuffle(1..5)[0..3]"}, "dis": {"templateType": "anything", "name": "dis", "group": "vi", "description": "", "definition": "sqrt(((px1-px)^2) + ((py1-py)^2))"}, "constant4a": {"templateType": "anything", "name": "constant4a", "group": "iii", "description": "", "definition": "-(((l[1])*px))+l[0]*(py)"}, "x4a": {"templateType": "anything", "name": "x4a", "group": "iii", "description": "", "definition": "1000*m"}, "y": {"templateType": "anything", "name": "y", "group": "Ungrouped variables", "description": "", "definition": "(neg[1]-neg[0])"}, "y4": {"templateType": "anything", "name": "y4", "group": "iii", "description": "", "definition": "y4a/gcd4"}, "l_s": {"templateType": "anything", "name": "l_s", "group": "Ungrouped variables", "description": "", "definition": "-l[0]/l[1]"}, "constant1a": {"templateType": "anything", "name": "constant1a", "group": "iv", "description": "", "definition": "constanta/gcda"}, "x1a": {"templateType": "anything", "name": "x1a", "group": "iv", "description": "", "definition": "xa/gcda"}, "gcd2a": {"templateType": "anything", "name": "gcd2a", "group": "iv", "description": "", "definition": "-l[0]"}, "y1a": {"templateType": "anything", "name": "y1a", "group": "iv", "description": "", "definition": "ya/gcda"}, "gcd1a": {"templateType": "anything", "name": "gcd1a", "group": "iv", "description": "", "definition": "l[1]"}, "py1": {"templateType": "anything", "name": "py1", "group": "iv", "description": "", "definition": "random(-5..-2 except py)"}, "constant": {"templateType": "anything", "name": "constant", "group": "Ungrouped variables", "description": "", "definition": "((neg[1]-neg[0])*-pos[0])-((neg[2]-pos[0])*-neg[0])"}, "py": {"templateType": "anything", "name": "py", "group": "iii", "description": "", "definition": "random(-5..-2)"}, "gcd": {"templateType": "anything", "name": "gcd", "group": "Ungrouped variables", "description": "", "definition": "gcd(gcd1,gcd2)"}, "xa": {"templateType": "anything", "name": "xa", "group": "iv", "description": "", "definition": "l[0]"}, "gcda": {"templateType": "anything", "name": "gcda", "group": "iv", "description": "", "definition": "gcd(gcd1a,gcd2a)"}}, "metadata": {"description": "

Practice finding parallel and perpendicular lines to a given line.

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [{"name": "iv", "variables": ["ya", "xa", "constanta", "gcd1a", "gcd2a", "gcda", "y1a", "x1a", "constant1a", "py1", "px1"]}, {"name": "iii", "variables": ["m", "py", "px", "y4a", "x4a", "constant4a", "gcd4a", "gcd4b", "gcd4", "x4", "y4", "constant4"]}, {"name": "v", "variables": ["x5", "y5"]}, {"name": "vi", "variables": ["dis"]}], "functions": {}, "statement": "

L is the line $\\var{l[0]}x + \\var{l[1]}y = \\var{l[2]}$

\n

", "tags": [], "ungrouped_variables": ["l", "p_a", "p_b", "l_s", "y", "constant", "x", "gcd1", "gcd2", "gcd", "y1", "x1", "constant1", "neg", "pos"], "type": "question", "contributors": [{"name": "cormac breen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/306/"}, {"name": "Katherine Tomlinson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1652/"}]}]}], "contributors": [{"name": "cormac breen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/306/"}, {"name": "Katherine Tomlinson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1652/"}]}