// Numbas version: finer_feedback_settings {"name": "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": [{"functions": {}, "ungrouped_variables": ["l", "p_a", "p_b", "l_s", "y", "constant", "x", "gcd1", "gcd2", "gcd", "y1", "x1", "constant1", "neg", "pos"], "name": "Q2 Given a line, Coordinate Geometry ", "tags": ["rebelmaths"], "preamble": {"css": "", "js": ""}, "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

", "rulesets": {}, "parts": [{"prompt": "

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

\n

Give answer in fraction form.

\n

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

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

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

\n

Give answer in fraction form.

\n

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "0", "minValue": "0", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{l[2]}/{l[1]}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"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]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "ALL", "scripts": {}, "answer": "{l[1]}/{l[0]}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{constant4a}/{l[0]}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"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]]

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

Find the mid-point of the line segment cd.

\n

Give answer to 2 decimal points.

\n

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "x5", "strictPrecision": false, "minValue": "x5", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "showPrecisionHint": false, "type": "numberentry"}, {"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "y5", "strictPrecision": false, "minValue": "y5", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "showPrecisionHint": false, "type": "numberentry"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Calculate the distance from c to d.

\n

Give answer to 2 decimal places.

\n

ans = [[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "{dis}", "strictPrecision": false, "minValue": "{dis}", "variableReplacementStrategy": "originalfirst", "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": "2", "scripts": {}, "marks": 1, "showPrecisionHint": false, "type": "numberentry"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "

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

\n

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

Practice finding parallel and perpendicular lines to a given line.

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}]}]}], "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}]}