randRange(-9, 8) randRange(-9, 9) randRange(X1 + 1, 9) randRange(-9, 9) (Y1 - Y2) / (X1 - X2) randRange( 0, 1 )

What is the slope of the line through the points `(X1, Y1)` and `(X2, Y2)`?

graphInit({ range: 10, scale: 20, tickStep: 1, labelStep: 1, unityLabels: false, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); line( [X1 - 19, Y1 - 19 * M], [X2 + 19, Y2 + 19 * M], { stroke: "#888" } ); style({ fill: PURPLE, stroke: PURPLE }); circle( [X1, Y1], 3/20 ); style({ fill: BLUE, stroke: BLUE }); circle( [X2, Y2], 3/20 );
(Y1 - Y2) / (X1 - X2)

The slope of a line is the amount of change in the `y`-coordinate as the `x`-coordinate increases by one unit.

The equation for the slope is:

`\qquad m = \dfrac{\blue{y_2} - \purple{y_1}}{\blue{x_2} - \purple{x_1}}`

style({ fill: "", stroke: PINK }); line( [ X1, Y2 ], [ X2, Y2 ] ); style({ stroke: GREEN }); line( [ X1, Y1 ], [ X1, Y2 ] );

Substitute the values for `(\purple{X1}, \purple{Y1})` and `(\blue{X2}, \blue{Y2})`:

`\qquad m = \dfrac{\blue{Y2} - \purple{negParens(Y1)}} {\blue{X2} - \purple{negParens(X1)}} = \dfrac{\green{Y2 - Y1}}{\pink{X2 - X1}}`

So, the slope `m` is `fractionReduce( Y2 - Y1, X2 - X1 )`.

randRange( -3, 3 ) randRange( 2, 5 ) [ { value: M_INIT, display: M_INIT }, { value: -1 * M_INIT, display: "-" + M_INIT }, { value: 1 / M_INIT, display: "\\dfrac{1}{" + M_INIT + "}" }, { value: -1 / M_INIT, display: "-\\dfrac{1}{" + M_INIT + "}" } ] shuffle([ { name: $._("Blue"), hex: KhanUtil.BLUE }, { name: $._("Purple"), hex: KhanUtil.PURPLE }, { name: $._("Green"), hex: KhanUtil.GREEN }, { name: $._("Pink"), hex: KhanUtil.PINK } ]) randRange( 0, 3 ) [ 0, 1, 2, 3 ] _.filter(DUMMY, function(n) { return n !== WHICH; }) _.map(OTHERS, function(i) { return "<code>\\color{" + COLORS[i].hex + "}{" + SLOPES[i].display + "}</code>"; }) SLOPES[WHICH]

Which graph best depicts a slope of `M.display`?

graphInit({ range: 6, scale: 16.9, tickStep: 1, labelStep: 1, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); style({ stroke: COLORS[index].hex }); label([0,-6], "\\color{" + COLORS[index].hex + "}" + "{\\text{" + COLORS[index].name + "}}", "below"); plot(function( x ) { return ( x - 1 ) * SLOPES[index].value + B; }, [ -11, 11 ]);
`\quad \color{COLORS[WHICH].hex}{\text{COLORS[WHICH].name}}`

1. `\quad \color{COLORS[index].hex}{\text{COLORS[index].name}}`

A slope of `M.display` means that the `y`-coordinate changes by `M.display` as the `x`-coordinate increases by one unit.

The `\color{COLORS[WHICH].hex}{\text{COLORS[WHICH].name.toLowerCase()}}` graph has a slope of `M.display`. The other graphs have slopes of toSentence(OTHER_SLOPES).

[ { value: M_INIT, display: M_INIT }, { value: 0, display: 0 }, { value: 999, display: "undefined" }, { value: 1 / M_INIT, display: "\\dfrac{1}{" + M_INIT + "}" } ] randRange(1, 2) SLOPES[WHICH]

Which graph best depicts a slope of `M.display`? Which graph best depicts an undefined slope?

A slope of `M.display` means the `y`-coordinate doesn't change at all as the `x`-coordinate changes.

A vertical line has an undefined slope. The `x`-coordinate doesn't change, so if we try to calculate the slope between two points with `m = \dfrac{\blue{y_2} - \purple{y_1}}{\blue{x_2} - \purple{x_1}}`, we'll have to divide by zero!

The `\color{COLORS[WHICH].hex}{\text{COLORS[WHICH].name.toLowerCase()}}` graph depicts an undefined slope.

The `\color{COLORS[WHICH].hex}{\text{COLORS[WHICH].name.toLowerCase()}}` graph depicts a slope of `M.display`.