// Numbas version: exam_results_page_options {"name": "Math6000 WS16 Coordinate Geometry", "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "showresultspage": "oncompletion", "preventleave": true, "browse": true, "showfrontpage": true}, "feedback": {"allowrevealanswer": true, "showtotalmark": true, "advicethreshold": 0, "intro": "", "feedbackmessages": [], "showanswerstate": true, "showactualmark": true}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "percentPass": 0, "duration": 0, "question_groups": [{"pickingStrategy": "all-ordered", "name": "Group", "pickQuestions": 1, "questions": [{"name": "Q1 Given 3 points, Coordinate Geometry 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}], "functions": {}, "ungrouped_variables": ["a", "ab_s", "b", "bc_s", "c", "check", "check1", "checkb", "grad", "lhs", "marking1", "markinga", "markingb", "neg", "pos", "possible", "possibleb", "slope", "xbpoint", "xpoint", "ybpoint", "yc", "yint", "ypoint"], "tags": ["rebelmaths"], "preamble": {"css": "", "js": ""}, "advice": "

a(-3,1), b(-1,-2) and c(2,0)

\n

a) Find the slope of both ab and bc, using the formula $\\frac{Y2-Y1}{X2-X1}$

\n

slope of ab = $\\frac{-2-1}{-1-(-3)} = -\\frac{3}{2}$

\n

slope of bc = $\\frac{0-(-2)}{2-(-1)} = \\frac{2}{3}$

\n

$-\\frac{3}{2} \\times \\frac{2}{3} = -1$

\n

If slope of ab $\\times$ slope of bc = -1, then they are perpendicular

\n

b) Using the slope of ab in part a and the formula Y - y1 = m(X - x1), where (x1,y1) can be either the point a or b.

\n

$Y - 1 = -\\frac{3}{2}(X - (-2))$

\n

$3X + 2Y = -4$

\n

c) Using the slope of ab in part a and the formula Y - y1 = m(X - x1), where (x1,y1) is the point c(2,0).

\n

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

\n

slope of ab= $ -\\frac{3}{2}$

\n

$Y - 0 = -\\frac{3}{2}(X - 2)$

\n

$3X + 2Y = 6$

\n

d) Find the slope of ac, like in part a, and use the formula Y - y1 = m(X - x1), where (x1,y1) is the point c(-4,2).

\n

slope of ac = $\\frac{0-1}{2-(-3)} = -\\frac{1}{5}$

\n

Since the line is perpendicular to ac the product of the slopes is -1. i.e. m $\\times$ (slope of ac($-\\frac{1}{5}$)) = -1 

\n

m = 5

\n

$Y - 2 = 5(X - (-4))$

\n

$3X - Y = -22$

\n

e) Using the formula $(\\frac{X1+X2}{2},\\frac{Y1+Y2}{2})$, where (X1,Y1) = a(-3,1) and (X2,Y2) = b(-1,-2).

\n

$(\\frac{-3+(-1)}{2},\\frac{1+(-2)}{2}) = (-2,-\\frac{1}{2})$

\n

f) Using the formula dis = $\\sqrt((X2-X1)^2 + (Y2-Y1)^2)$, where (X1,Y1) = b(-1,-2) and (X2,Y2) = c(2,0).

\n

$\\sqrt((2-(-1))^2 + (0-(-2))^2)$

\n

$\\sqrt(9 + 4) = 3.6056$

\n

g) Line is parallel to ab, therefore; slope of ab = $\\frac{-2-1}{-1-(-3)} = -\\frac{3}{2}$

\n

Using the formula $\\frac{Y2-Y1}{X2-X1}$

\n

$\\frac{4-p}{-3-5} = -\\frac{3}{2}$

\n

p = -8

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

Investigate if ab is perpendicular to bc.

", "matrix": "marking1", "shuffleChoices": true, "variableReplacements": [], "choices": ["

Yes

", "

No

"], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}, {"prompt": "

Find the equation of the line ab.

\n

Give answer to 1 decimal place.

\n

([[0]])X +( [[1]])Y = [[2]]

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

Find the equation of the line parallel to ab and passing through c.

\n

Give answer to 1 decimal place.

\n

([[0]])X +( [[1]])Y = [[2]]

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

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

\n

Note: When calculating the slope round to 3 decimal places for accurate result.

\n

Give answer to 1 decimal place.

\n

([[0]])X +( [[1]])Y = [[2]]

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

Find the mid-point of the line segment ab.

\n

Give answer in fraction form.

\n

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "x5", "minValue": "x5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "y5", "minValue": "y5", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Calculate the distance from b to c.

\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, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

The line containing ($\\var{points[0]}$ , p) and ($\\var{pointneg}$ , $\\var{points[1]}$) is parallel to ab. Evaluate p.

\n

Give answer to 2 decimal places.

\n

p = [[0]]

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

a($\\var{neg[0]}$,$\\var{pos[0]}$), b($\\var{neg[1]}$,$\\var{neg[2]}$) and c($\\var{pos[1]}$,$\\var{yc}$) are three points.

\n

Note if any part of the points are in decimal convert to fraction for accurate result:

\n

i.e. 0.33 = $\\frac{1}{3}$ and 0.67 = $\\frac{2}{3}$ and 0.25 = $\\frac{1}{4}$

\n

", "variable_groups": [{"variables": ["y", "constant", "x", "gcd1", "gcd2", "gcd", "y1", "x1", "constant1"], "name": "ii"}, {"variables": ["ya", "xa", "constanta", "gcd1a", "gcd2a", "gcda", "y1a", "x1a", "constant1a"], "name": "iii"}, {"variables": ["m", "px", "py", "y4a", "x4a", "constant4a", "gcd4a", "gcd4b", "gcd4", "x4", "y4", "constant4"], "name": "iv"}, {"variables": ["x5", "y5"], "name": "v"}, {"variables": ["dis"], "name": "vi"}, {"variables": ["points", "pointneg", "unvar"], "name": "vii"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"slope": {"definition": "random(-1,1.5,-1.5,2,-2)", "templateType": "anything", "group": "Ungrouped variables", "name": "slope", "description": ""}, "constant": {"definition": "(1000*pos[0])+(ab_s*1000*-neg[0])", "templateType": "anything", "group": "ii", "name": "constant", "description": ""}, "bc_s": {"definition": "(yc-neg[2])/(pos[2]-neg[1])", "templateType": "anything", "group": "Ungrouped variables", "name": "bc_s", "description": ""}, "yint": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "yint", "description": ""}, "checkb": {"definition": "if(possibleb=ybpoint,false,true)", "templateType": "anything", "group": "Ungrouped variables", "name": "checkb", "description": ""}, "xa": {"definition": "1000*-ab_s", "templateType": "anything", "group": "iii", "name": "xa", "description": ""}, "pos": {"definition": "shuffle(0..6)[0..3]", "templateType": "anything", "group": "Ungrouped variables", "name": "pos", "description": ""}, "xpoint": {"definition": "random(-10..10 except -1..1)", "templateType": "anything", "group": "Ungrouped variables", "name": "xpoint", "description": ""}, "constant1a": {"definition": "constanta/gcda", "templateType": "anything", "group": "iii", "name": "constant1a", "description": ""}, "marking1": {"definition": "[if(check1=true,1,0),if(check1=true,0,1)]", "templateType": "anything", "group": "Ungrouped variables", "name": "marking1", "description": ""}, "gcda": {"definition": "gcd(gcd1a,gcd2a)", "templateType": "anything", "group": "iii", "name": "gcda", "description": ""}, "y1": {"definition": "y/gcd", "templateType": "anything", "group": "ii", "name": "y1", "description": ""}, "constant4": {"definition": "constant4a/gcd4", "templateType": "anything", "group": "iv", "name": "constant4", "description": ""}, "constant1": {"definition": "constant/gcd", "templateType": "anything", "group": "ii", "name": "constant1", "description": ""}, "check": {"definition": "ypoint=grad*xpoint+yint", "templateType": "anything", "group": "Ungrouped variables", "name": "check", "description": ""}, "ab_s": {"definition": "(neg[2]-pos[0])/(neg[1]-neg[0])", "templateType": "anything", "group": "Ungrouped variables", "name": "ab_s", "description": ""}, "gcd2a": {"definition": "gcd(constanta,ya)", "templateType": "anything", "group": "iii", "name": "gcd2a", "description": ""}, "gcd": {"definition": "gcd(gcd1,gcd2)", "templateType": "anything", "group": "ii", "name": "gcd", "description": ""}, "neg": {"definition": "shuffle(-6..-1 )[0..3]", "templateType": "anything", "group": "Ungrouped variables", "name": "neg", "description": ""}, "px": {"definition": "random(-5..-1)", "templateType": "anything", "group": "iv", "name": "px", "description": ""}, "py": {"definition": "random(1..6)", "templateType": "anything", "group": "iv", "name": "py", "description": ""}, "y1a": {"definition": "ya/gcda", "templateType": "anything", "group": "iii", "name": "y1a", "description": ""}, "y4": {"definition": "y4a/gcd4", "templateType": "anything", "group": "iv", "name": "y4", "description": ""}, "gcd4b": {"definition": "gcd(constant4a,y4a)", "templateType": "anything", "group": "iv", "name": "gcd4b", "description": ""}, "gcd4a": {"definition": "gcd(constant4a,x4a)", "templateType": "anything", "group": "iv", "name": "gcd4a", "description": ""}, "ypoint": {"definition": "grad*xpoint+random(yint,-yint,possible)", "templateType": "anything", "group": "Ungrouped variables", "name": "ypoint", "description": ""}, "pointneg": {"definition": "random(-6..-2 except points)", "templateType": "anything", "group": "vii", "name": "pointneg", "description": ""}, "x4": {"definition": "x4a/gcd4", "templateType": "anything", "group": "iv", "name": "x4", "description": ""}, "gcd4": {"definition": "gcd(gcd4a,gcd4b)", "templateType": "anything", "group": "iv", "name": "gcd4", "description": ""}, "gcd2": {"definition": "gcd(constant,y)", "templateType": "anything", "group": "ii", "name": "gcd2", "description": ""}, "markingb": {"definition": "[if(checkb=true,1,0),if(checkb=true,0,1)]", "templateType": "anything", "group": "Ungrouped variables", "name": "markingb", "description": ""}, "markinga": {"definition": "[if(check=true,1,0),if(check=true,0,1)]", "templateType": "anything", "group": "Ungrouped variables", "name": "markinga", "description": ""}, "xbpoint": {"definition": "random(-10..10 except -1..1)", "templateType": "anything", "group": "Ungrouped variables", "name": "xbpoint", "description": ""}, "ya": {"definition": "1000", "templateType": "anything", "group": "iii", "name": "ya", "description": ""}, "yc": {"definition": "precround((neg[2] + (ab_s*(pos[1]-neg[1])*((neg[1]-neg[0])/(neg[2]-pos[0])))),2)", "templateType": "anything", "group": "Ungrouped variables", "name": "yc", "description": ""}, "constanta": {"definition": "(1000*yc)+(ab_s*1000*-pos[1])", "templateType": "anything", "group": "iii", "name": "constanta", "description": ""}, "possible": {"definition": "random(-12..12 except [0,-yint,yint])", "templateType": "anything", "group": "Ungrouped variables", "name": "possible", "description": ""}, "x1": {"definition": "x/gcd", "templateType": "anything", "group": "ii", "name": "x1", "description": ""}, "unvar": {"definition": "(-ab_s*(pointneg-points[0]))+points[1]", "templateType": "anything", "group": "vii", "name": "unvar", "description": ""}, "y5": {"definition": "(neg[2]+pos[0])/2", "templateType": "anything", "group": "v", "name": "y5", "description": ""}, "x5": {"definition": "(neg[1]+neg[0])/2", "templateType": "anything", "group": "v", "name": "x5", "description": ""}, "a": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "possibleb": {"definition": "random(-10..10 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "possibleb", "description": ""}, "ybpoint": {"definition": "random(possibleb,-(c+a*xbpoint)/b)", "templateType": "anything", "group": "Ungrouped variables", "name": "ybpoint", "description": ""}, "gcd1": {"definition": "gcd(constant,x)", "templateType": "anything", "group": "ii", "name": "gcd1", "description": ""}, "m": {"definition": "precround(-1/((yc-pos[0])/(pos[1]-neg[0])),3)", "templateType": "anything", "group": "iv", "name": "m", "description": ""}, "gcd1a": {"definition": "gcd(constanta,xa)", "templateType": "anything", "group": "iii", "name": "gcd1a", "description": ""}, "dis": {"definition": "sqrt(((pos[1]-neg[1])^2) + ((yc-neg[2])^2))", "templateType": "anything", "group": "vi", "name": "dis", "description": ""}, "constant4a": {"definition": "((-px*m*1000)+(1000*py))", "templateType": "anything", "group": "iv", "name": "constant4a", "description": ""}, "points": {"definition": "shuffle(2..6)[0..2]", "templateType": "anything", "group": "vii", "name": "points", "description": ""}, "lhs": {"definition": "{a}*{xbpoint}+{b}*{ybpoint}+{c}", "templateType": "anything", "group": "Ungrouped variables", "name": "lhs", "description": ""}, "x4a": {"definition": "1000*-m", "templateType": "anything", "group": "iv", "name": "x4a", "description": ""}, "x1a": {"definition": "xa/gcda", "templateType": "anything", "group": "iii", "name": "x1a", "description": ""}, "y": {"definition": "1000", "templateType": "anything", "group": "ii", "name": "y", "description": ""}, "x": {"definition": "-1000*ab_s", "templateType": "anything", "group": "ii", "name": "x", "description": ""}, "y4a": {"definition": "1000", "templateType": "anything", "group": "iv", "name": "y4a", "description": ""}, "grad": {"definition": "random(6..6 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "grad", "description": ""}, "check1": {"definition": "if(slope=-1,true,false)", "templateType": "anything", "group": "Ungrouped variables", "name": "check1", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Q2 Given a line, Coordinate Geometry ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}], "functions": {}, "ungrouped_variables": ["l", "p_a", "p_b", "l_s", "y", "constant", "x", "gcd1", "gcd2", "gcd", "y1", "x1", "constant1", "neg", "pos"], "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"}], "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"}, {"name": "Q3 Given 2 lines, Coordinate Geometry 1", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}], "functions": {"inter": {"definition": "\n var a = Numbas.jme.unwrapValue(scope.variables.p_m);\n var b = Numbas.jme.unwrapValue(scope.variables.p_c);\n var c = Numbas.jme.unwrapValue(scope.variables.r_m);\n var d = Numbas.jme.unwrapValue(scope.variables.r_c);\n\n var miny = Numbas.jme.unwrapValue(scope.variables.miny);\n var maxy = Numbas.jme.unwrapValue(scope.variables.maxy);\n var minx = Numbas.jme.unwrapValue(scope.variables.minx);\n var maxx = Numbas.jme.unwrapValue(scope.variables.maxx);\n var div = Numbas.extensions.jsxgraph.makeBoard('600px','600px',\n {boundingBox:[minx,maxy,maxx,miny],\n axis:true,\n showNavigation:false,\n grid:true});\n var brd = div.board; \n var li1=brd.create('line',[[0,-b],[1,a-b]],{fixed:true,name:'Line P',withLabel:true});\n var li2=brd.create('line',[[0,d],[1,c+d]],{fixed:true,name:'Line R',withLabel:true});\n \n\n return div;\n ", "type": "html", "language": "javascript", "parameters": []}}, "ungrouped_variables": ["pr", "c1", "c2", "a", "b", "val1", "above1", "below1", "on1", "mark1a", "mark1b", "mark1o", "val2", "above2", "below2", "on2", "mark2a", "mark2b", "mark2o"], "tags": ["rebelmaths"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"displayColumns": 0, "prompt": "

Is the point a($\\var{a[0]}$,$\\var{a[1]}$) on, above or below the line P?

", "matrix": "mark1a", "shuffleChoices": true, "variableReplacements": [], "choices": ["

Above

", "

Below

", "

On

"], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}, {"displayColumns": 0, "prompt": "

Is the point b($\\var{b[0]}$,$\\var{b[1]}$) on, above or below the line R?

", "matrix": "mark2a", "shuffleChoices": true, "variableReplacements": [], "choices": ["

Above

", "

Below

", "

On

"], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "1_n_2", "displayType": "radiogroup", "minMarks": 0}, {"prompt": "

Give answer in fraction form.

\n

Find the slope of line P:

\n

[[0]]

\n

Find the slope of line R:

\n

[[1]]

\n

Is P perpendicular to R.

\n

[[2]]

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

Find the point of intersection of P and R.

\n

Give answer to 2 decimal places.

\n

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "{x4}+0.01", "minValue": "{x4}-0.01", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{y4}+0.01", "minValue": "{y4}-0.01", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Find the points, c and d, where R intersects both axes.

\n

Give answer in fraction form.

\n

Point c, R intersects x-axis = ([[0]],[[1]])

\n

Point d, R intersects y-axis = ([[2]],[[3]])

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

Find the mid-point of the line segment ab.

\n

Give answer to 2 decimal points.

\n

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "{x5}", "minValue": "{x5}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{y5}", "minValue": "{y5}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Calculate the distance from b to a.

\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": true, "variableReplacements": [], "maxValue": "{dis}+0.1", "strictPrecision": false, "minValue": "{dis}-0.1", "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": "

The point (a , $\\var{n6}$) is on  P, find the value of a.

\n

Give answer to 2 decimal places.

\n

a = [[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "{ans7}+0.01", "minValue": "{ans7}-0.01", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

The line containing ($\\var{neg8}$ , $\\var{pos8[0]}$) and (p , $\\var{pos8[1]}$) is parallel to R. Evaluate p. Give your answer correct to two decimal places.

\n

p = [[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "{ans8}+0.01", "minValue": "{ans8}-0.01", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

{inter()}

\n

P is the line $\\var{pr[0]}x - \\var{pr[1]}y - \\var{c1} = 0$ and R is the line $\\var{pr[1]}x + \\var{pr[0]}y - \\var{c2} = 0$.

\n

\n

", "variable_groups": [{"variables": ["x4", "y4"], "name": "iv"}, {"variables": ["m_p", "m_r", "perp", "mark3"], "name": "iii"}, {"variables": ["x5", "y5", "cx", "dy"], "name": "v and vi"}, {"variables": ["dis", "n6", "ans7"], "name": "vii"}, {"variables": ["neg8", "pos8", "ans8"], "name": "viii"}, {"variables": ["p_m", "p_c", "r_m", "r_c", "minx", "maxx", "miny", "maxy"], "name": "graph"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"ans8": {"definition": "((pos8[1]-pos8[0])/m_r)+neg8", "templateType": "anything", "group": "viii", "name": "ans8", "description": ""}, "p_m": {"definition": "precround(pr[0]/pr[1],2)", "templateType": "anything", "group": "graph", "name": "p_m", "description": ""}, "p_c": {"definition": "precround(c1/pr[1],2)", "templateType": "anything", "group": "graph", "name": "p_c", "description": ""}, "ans7": {"definition": "(c1+(pr[1]*n6))/pr[0]", "templateType": "anything", "group": "vii", "name": "ans7", "description": ""}, "minx": {"definition": "min(0,ceil((r_c-p_c)/(p_m-r_m))-5)", "templateType": "anything", "group": "graph", "name": "minx", "description": ""}, "below2": {"definition": "if(b[1] < val2,true,false)", "templateType": "anything", "group": "Ungrouped variables", "name": "below2", "description": ""}, "below1": {"definition": "if(a[1] < val1,true,false)", "templateType": "anything", "group": "Ungrouped variables", "name": "below1", "description": ""}, "cx": {"definition": "c2/pr[0]", "templateType": "anything", "group": "v and vi", "name": "cx", "description": ""}, "pos8": {"definition": "shuffle(3..7)[0..2]", "templateType": "anything", "group": "viii", "name": "pos8", "description": ""}, "val2": {"definition": "((-pr[1]/pr[0])*b[0])+((c2/pr[0]))", "templateType": "anything", "group": "Ungrouped variables", "name": "val2", "description": ""}, "val1": {"definition": "((pr[0]/pr[1])*a[0])-((c1/pr[1]))", "templateType": "anything", "group": "Ungrouped variables", "name": "val1", "description": ""}, "y5": {"definition": "(a[1]+b[1])/2", "templateType": "anything", "group": "v and vi", "name": "y5", "description": ""}, "y4": {"definition": "((pr[0]*c2) - (pr[1]*c1))/((pr[0]*pr[0])+(pr[1]*pr[1]))", "templateType": "anything", "group": "iv", "name": "y4", "description": ""}, "pr": {"definition": "shuffle(2..5 except 4)[0..2]", "templateType": "anything", "group": "Ungrouped variables", "name": "pr", "description": ""}, "maxx": {"definition": "max(0,ceil((r_c-p_c)/(p_m-r_m))+5)", "templateType": "anything", "group": "graph", "name": "maxx", "description": ""}, "maxy": {"definition": "max(0,ceil((p_m*r_c-p_c*r_m)/(p_m-r_m))+5)", "templateType": "anything", "group": "graph", "name": "maxy", "description": ""}, "perp": {"definition": "if(m_p*m_r = -1,true,false)", "templateType": "anything", "group": "iii", "name": "perp", "description": ""}, "mark1b": {"definition": "[if(below1=true,1,0),if(below1=true,0,1)]", "templateType": "anything", "group": "Ungrouped variables", "name": "mark1b", "description": ""}, "r_m": {"definition": "precround(-pr[1]/pr[0],2)", "templateType": "anything", "group": "graph", "name": "r_m", "description": ""}, "mark1a": {"definition": "[if(above1=true,1,0),if(below1=true,1,0),if(below1=true,1,0)]", "templateType": "anything", "group": "Ungrouped variables", "name": "mark1a", "description": ""}, "mark1o": {"definition": "[if(on1=true,1,0),if(on1=true,0,1)]", "templateType": "anything", "group": "Ungrouped variables", "name": "mark1o", "description": ""}, "r_c": {"definition": "precround(c2/pr[0],2)", "templateType": "anything", "group": "graph", "name": "r_c", "description": ""}, "neg8": {"definition": "random(-6..-2)", "templateType": "anything", "group": "viii", "name": "neg8", "description": ""}, "dy": {"definition": "c2/pr[1]", "templateType": "anything", "group": "v and vi", "name": "dy", "description": ""}, "on2": {"definition": "if(b[1] = val2,true,false)", "templateType": "anything", "group": "Ungrouped variables", "name": "on2", "description": ""}, "c2": {"definition": "random(25..39)", "templateType": "anything", "group": "Ungrouped variables", "name": "c2", "description": ""}, "c1": {"definition": "random(5..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}, "on1": {"definition": "if(a[1] = val1,true,false)", "templateType": "anything", "group": "Ungrouped variables", "name": "on1", "description": ""}, "x4": {"definition": "((pr[1]*c2) + (pr[0]*c1))/((pr[0]*pr[0])+(pr[1]*pr[1]))", "templateType": "anything", "group": "iv", "name": "x4", "description": ""}, "x5": {"definition": "(a[0]+b[0])/2", "templateType": "anything", "group": "v and vi", "name": "x5", "description": ""}, "a": {"definition": "shuffle(2..5)[0..2]", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "shuffle(7..15)[0..2]", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "miny": {"definition": "min(0,ceil((p_m*r_c-p_c*r_m)/(p_m-r_m))-5)", "templateType": "anything", "group": "graph", "name": "miny", "description": ""}, "above2": {"definition": "if(b[1] > val2,true,false)", "templateType": "anything", "group": "Ungrouped variables", "name": "above2", "description": ""}, "above1": {"definition": "if(a[1] > val1,true,false)", "templateType": "anything", "group": "Ungrouped variables", "name": "above1", "description": ""}, "mark2o": {"definition": "[if(on2=true,1,0),if(on2=true,0,1)]", "templateType": "anything", "group": "Ungrouped variables", "name": "mark2o", "description": ""}, "n6": {"definition": "random(2..6)", "templateType": "anything", "group": "vii", "name": "n6", "description": ""}, "mark3": {"definition": "[if(perp=true,1,0),if(perp=true,0,1)]", "templateType": "anything", "group": "iii", "name": "mark3", "description": ""}, "m_r": {"definition": "-precround((pr[1]/pr[0]),2)", "templateType": "anything", "group": "iii", "name": "m_r", "description": ""}, "m_p": {"definition": "pr[0]/pr[1]", "templateType": "anything", "group": "iii", "name": "m_p", "description": ""}, "mark2b": {"definition": "[if(below2=true,1,0),if(below2=true,0,1)]", "templateType": "anything", "group": "Ungrouped variables", "name": "mark2b", "description": ""}, "mark2a": {"definition": "[if(above2=true,1,0),if(above2=true,1,0),if(below2=true,1,0)]", "templateType": "anything", "group": "Ungrouped variables", "name": "mark2a", "description": ""}, "dis": {"definition": "sqrt(((a[1]-b[1])^2) + ((a[0]-b[0])^2))", "templateType": "anything", "group": "vii", "name": "dis", "description": ""}}, "metadata": {"description": "

Reading information from the equation of the line. Graph shown

\n

Rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question"}, {"name": "Q4 Gradient intercept form of a line", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/591/"}], "functions": {"eqnline": {"definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n \n// The line is described by the equation \n// y = a*x + b\n\n// This function takes as its parameters the coefficients a and b,\n// and the coordinates (x2,y2) of a point on the line.\n\n// First, make the JSXGraph board.\n// The function provided by the JSXGraph extension wraps the board up in \n// a div tag so that it's easier to embed in the page.\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n{boundingBox: [-11,11,11,-11],\n axis: false,\n showNavigation: false,\n grid: true\n});\n \n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis.\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,2],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,2],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n// create the static line based on the coefficients a and b\n//var line1 = board.create('line',[[0,b],[1,a+b]],{fixed:true, strokeWidth: 1});\n\n// mark the two given points - one on the y-axis, and one at (x2,y2)\n//var p1 = board.create('point',[0,b],{fixed:true, size:3, name: 'P_1', face: 'cross'});\n//var p2 = board.create('point',[x2,y2],{fixed:true, size:3, name: 'P_2', face: 'cross'});\n\n// Now we can do the clever stuff with the student's answer!\n// We'll add a curve to the board which is a plot of a function we provide.\n// That function will parse the student's input and evaluate it.\n\n// The variable `studentExpression` will store the parsed version of\n// the student's expression.\nvar studentExpression;\n\n// This function evaluates the student's expression at a given point `t`.\nfunction makestudentline(x){\n // Create a JME scope with the variable x set to the given value.\n var nscope = new Numbas.jme.Scope([\nNumbas.jme.builtinScope,\n{variables: {x: new Numbas.jme.types.TNum(x)}}\n ]);\n \n // If the student's input has been parsed, evaluate it\n if(studentExpression) {\ntry {\n var val = Numbas.jme.evaluate(studentExpression,nscope).value;\n return val;\n}\ncatch(e) {\n // If there was an error evaluating the student's expression\n // (wrong variables, or some other weirdness)\n // throw an error\n throw(e)\n}\n }\n // Otherwise, if the student's expression hasn't been parsed\n // (they haven't written anything, or they wrote bad syntax)\n // return 0\n else {\nreturn 0;\n }\n}\nvar studentline = board.create('functiongraph', \n [makestudentline,-11,11],\n {strokeColor:'#00ff00',strokeWidth:2, visible: false}\n );\n\n// This is where some voodoo happens.\n// Because the HTML for the question is inserted into the page after the function eqnline\n// is called, we need to wait until the 'question-html-attached' event is fired\n// to do the interaction with the student input box.\n// So:\n\n// When the question is inserted into the page\nquestion.signals.on('HTMLAttached',function(e) {\n \n // Create a Knockout.js observable\n ko.computed(function(){\n// Get the student's input string from part 0, gap 0.\nvar studentString = question.parts[q].gaps[0].display.studentAnswer();\n\n// Try to parse it as a JME expression\ntry {\n var issue = /[A-W]|[YZ]|[\\^]/i.test(studentString);\n if(issue===false) \n {studentExpression = Numbas.jme.compile(studentString,scope)}\n else{studentExpression = null;\n studentline.hideElement()};///////////////////\n \n \n // If the student didn't write anything, compile returns null\n if(studentExpression === null)\nthrow(new Error('no expression'));\n \n // If everything worked, show the line and update it\n // (this calls makestudentline on a few points)\n studentline.showElement();\n studentline.updateCurve();\n}\ncatch(e) {\n // If something went wrong, hide the curve\n studentExpression = null;\n studentline.hideElement();\n}\n\nboard.update();\n });\n}); \n\nreturn div;", "type": "html", "parameters": [["q", "number"]], "language": "javascript"}}, "ungrouped_variables": ["m1", "b1", "m2", "b2", "m3", "b3"], "tags": ["gradient", "intercept", "linear equation", "rebelmaths", "Straight Line", "straight line", "y=mx+b"], "advice": "

For $y=mx+b$, $m$ is the gradient and $b$ is the $y$-intercept.

\n

\n
\n

\n

The gradient (or slope of the line) is

\n\n

The $y$-intercept is the value of $y$ that the line crosses the $y$-axis at. Since the $y$-axis is the line that corresponds to $x=0$, the $y$-intercept is the $y$-value when $x=0$.

\n

\n
\n

\n

For example, given the equation $y=\\frac{2}{3}x-4$, we can see that the gradient is $\\frac{2}{3}$ and the $y$-intercept is $-4$. This constant gradient of $\\frac{2}{3}$ means that for a run of 3 we need a rise of 2 to stay on the line. Note it also means that say if we run across 6, we need to rise by 4, since $\\frac{2}{3}=\\frac{4}{6}$.

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

Find the equation of the line which passes through (0 , {b1}) and has a slope of {m1}.

\n

Write the answer in the form y = mx + b.

\n

$y=$ [[0]]

\n

The following is the graph of the equation that you entered:

\n

{eqnline(0)}

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "", "showStrings": false, "strings": ["sin", " cos", " exp", " "], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{m1}*x+{b1}", "marks": 1, "checkvariablenames": true, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Find the equation of the line which passes through (0 , {b2}) and has a slope of {m2}.

\n

Write the answer in the form y = mx + b.

\n

$y=$ [[0]]

\n

The following is the graph of the equation that you entered:

\n

{eqnline(1)}

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "", "showStrings": false, "strings": ["sin", " cos", " exp", " "], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{m2}*x+{b2}", "marks": 1, "checkvariablenames": true, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Find the equation of the line which passes through (0 , {b3}) and has a slope of {m3}.

\n

Write the answer in the form y = mx + b.

\n

$y=$ [[0]]

\n

The following is the graph of the equation that you entered:

\n

{eqnline(2)}

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "", "showStrings": false, "strings": ["sin", " cos", " exp", " "], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{m3}*x+{b3}", "marks": 1, "checkvariablenames": true, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"b2": {"definition": "random(-10..10#0.25 except[-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10])", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}, "m2": {"definition": "random(-12.5..12.5#0.1 except [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10])", "templateType": "anything", "group": "Ungrouped variables", "name": "m2", "description": ""}, "m1": {"definition": "random(-12.5..12.5 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "m1", "description": ""}, "b1": {"definition": "random(-10..10#0.1 except[-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10])", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "m3": {"definition": "random(-12.5..12.5#0.25 except [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10])", "templateType": "anything", "group": "Ungrouped variables", "name": "m3", "description": ""}, "b3": {"definition": "random(-10..10#0.1 except[-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10])", "templateType": "anything", "group": "Ungrouped variables", "name": "b3", "description": ""}}, "metadata": {"notes": "", "description": "

Identifying gradient and $y$-intercept from $y=mx+b$.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "showQuestionGroupNames": false, "metadata": {"description": "

Coordinate Geometry of the line. Equations of lines.

\n

rebelmaths

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