randRangeNonZero( -5, 5 ) randRange( -5, 5 )
randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 )
(Y - YINT_1) / X (Y - YINT_2) / X toFraction( SLOPE_1, 0.001 ) toFraction( SLOPE_2, 0.001 )
SLOPE_1 === 1 ? "" : ( SLOPE_1 === -1 ? "-" : fraction( SLOPE_FRAC_1, SLOPE_FRAC_1, true, true ) ) SLOPE_2 === 1 ? "" : ( SLOPE_2 === -1 ? "-" : fraction( SLOPE_FRAC_2, SLOPE_FRAC_2, true, true ) ) randRangeNonZero( -3, 3 ) randRangeNonZero( -3, 3 ) SLOPE_FRAC_1 * -MULT_1 SLOPE_FRAC_2 * -MULT_2 SLOPE_FRAC_1 * MULT_1 SLOPE_FRAC_2 * MULT_2 SLOPE_FRAC_1 * YINT_1 * MULT_1 SLOPE_FRAC_2 * YINT_2 * MULT_2 randFromArray([ true, false ]) randFromArray([ true, false ]) randFromArray([ "<", ">", "≤", "≥" ]) randFromArray([ "<", ">", "≤", "≥" ]) B_1 < 0 ? { "<": ">", ">": "<", "≤": "≥", "≥": "≤" }[ COMP_1 ] : COMP_1 B_2 < 0 ? { "<": ">", ">": "<", "≤": "≥", "≥": "≤" }[ COMP_2 ] : COMP_2 COMP_1 === "<" || COMP_1 === "≤" COMP_2 === "<" || COMP_2 === "≤" COMP_1 === "≥" || COMP_1 === "≤" COMP_2 === "≥" || COMP_2 === "≤"

Graph the following system of inequalities:

expr([ "+", [ "*", A_1, "x" ], [ "*", B_1, "y" ] ]) STD_FORM_COMP_1 C_1

y COMP_1 PRETTY_SLOPE_1 x + YINT_1

expr([ "+", [ "*", A_2, "x" ], [ "*", B_2, "y" ] ]) STD_FORM_COMP_2 C_2

y COMP_2 PRETTY_SLOPE_2 x + YINT_2

Inequality 1:
Inequality 2:
graphInit({ range: 11, scale: 20, axisArrows: "<->", tickStep: 1, labelStep: 1, gridOpacity: 0.05, axisOpacity: 0.2, tickOpacity: 0.4, labelOpacity: 0.5 }); label( [ 0, -11 ], "y", "below" ); label( [ 11, 0 ], "x", "right" ); addMouseLayer(); graph.pointA = addMovablePoint({ coord: [ -5, 5 ], snapX: 0.5, snapY: 0.5, normalStyle: { stroke: KhanUtil.BLUE, fill: KhanUtil.BLUE } }); graph.pointB = addMovablePoint({ coord: [ 5, 5 ], snapX: 0.5, snapY: 0.5, normalStyle: { stroke: KhanUtil.BLUE, fill: KhanUtil.BLUE } }); graph.pointC = addMovablePoint({ coord: [ -5, -5 ], snapX: 0.5, snapY: 0.5, normalStyle: { stroke: KhanUtil.BLUE, fill: KhanUtil.BLUE } }); graph.pointD = addMovablePoint({ coord: [ 5, -5 ], snapX: 0.5, snapY: 0.5, normalStyle: { stroke: KhanUtil.BLUE, fill: KhanUtil.BLUE } }); graph.set = raphael.set(); graph.update = function() { graph.set.remove(); if ( abs( graph.pointB.coord - graph.pointA.coord ) > 0.001 ) { var slope = ( graph.pointB.coord - graph.pointA.coord ) / ( graph.pointB.coord - graph.pointA.coord ); var yint = slope * ( 0 - graph.pointA.coord ) + graph.pointA.coord; var shadeEdge = ( ( graph.pointA.coord < graph.pointB.coord ) ? graph.shadetop1 : !graph.shadetop1 ) ? 11 : -11; style({ stroke: BLUE, strokeWidth: 2, strokeDasharray: graph.dasharray1 }, function() { graph.set.push( line( [ -11, -11 * slope + yint ], [ 11, 11 * slope + yint ] ) ); }); style({ fill: BLUE, stroke: null, opacity: KhanUtil.FILL_OPACITY }, function() { graph.set.push( path([ [ 11, shadeEdge ], [ 11, 11 * slope + yint ], [ -11, -11 * slope + yint ], [ -11, shadeEdge ] ]) ); }); } else { // vertical line var x = graph.pointA.coord; var shadeEdge = ( ( graph.pointB.coord < graph.pointA.coord ) ? graph.shadetop1 : !graph.shadetop1 ) ? 11 : -11; style({ stroke: BLUE, strokeWidth: 2, strokeDasharray: graph.dasharray1 }, function() { graph.set.push( line( [ x, -11 ], [ x, 11 ] ) ); }); style({ fill: BLUE, stroke: null, opacity: KhanUtil.FILL_OPACITY }, function() { graph.set.push( path([ [ x, -11 ], [ x, 11 ], [ shadeEdge, 11 ], [ shadeEdge, -11 ] ]) ); }); } if ( abs( graph.pointD.coord - graph.pointC.coord ) > 0.001 ) { var slope = ( graph.pointD.coord - graph.pointC.coord ) / ( graph.pointD.coord - graph.pointC.coord ); var yint = slope * ( 0 - graph.pointC.coord ) + graph.pointC.coord; var shadeEdge = ( ( graph.pointC.coord < graph.pointD.coord ) ? graph.shadetop2 : !graph.shadetop2 ) ? 11 : -11; style({ stroke: GREEN, strokeWidth: 2, strokeDasharray: graph.dasharray2 }, function() { graph.set.push( line( [ -11, -11 * slope + yint ], [ 11, 11 * slope + yint ] ) ); }); style({ fill: GREEN, stroke: null, opacity: KhanUtil.FILL_OPACITY }, function() { graph.set.push( path([ [ 11, shadeEdge ], [ 11, 11 * slope + yint ], [ -11, -11 * slope + yint ], [ -11, shadeEdge ] ]) ); }); } else { // vertical line var x = graph.pointC.coord; var shadeEdge = ( ( graph.pointD.coord < graph.pointC.coord ) ? graph.shadetop2 : !graph.shadetop2 ) ? 11 : -11; style({ stroke: GREEN, strokeWidth: 2, strokeDasharray: graph.dasharray2 }, function() { graph.set.push( line( [ x, -11 ], [ x, 11 ] ) ); }); style({ fill: GREEN, stroke: null, opacity: KhanUtil.FILL_OPACITY }, function() { graph.set.push( path([ [ x, -11 ], [ x, 11 ], [ shadeEdge, 11 ], [ shadeEdge, -11 ] ]) ); }); } graph.set.toBack(); }; // A and B can't be in the same place graph.pointA.onMove = function( x, y ) { if ( x != graph.pointB.coord || y != graph.pointB.coord ) { graph.pointA.setCoord([ x, y ]); graph.update(); return true; } else { return false; } } graph.pointB.onMove = function( x, y ) { if ( x != graph.pointA.coord || y != graph.pointA.coord ) { graph.pointB.setCoord([ x, y, ]); graph.update(); return true; } else { return false; } } // C and D can't be in the same place graph.pointC.onMove = function( x, y ) { if ( x != graph.pointD.coord || y != graph.pointD.coord ) { graph.pointC.setCoord([ x, y ]); graph.update(); return true; } else { return false; } } graph.pointD.onMove = function( x, y ) { if ( x != graph.pointC.coord || y != graph.pointC.coord ) { graph.pointD.setCoord([ x, y, ]); graph.update(); return true; } else { return false; } } graph.dasharray1 = ""; graph.dasharray2 = ""; graph.shadetop1 = true; graph.shadetop2 = false; graph.update(); graph.pointA.toFront(); graph.pointB.toFront(); graph.pointC.toFront(); graph.pointD.toFront();
Drag the points to move both lines into the correct positions.
[ graph.pointA.coord, graph.pointB.coord, graph.pointA.coord > graph.pointB.coord ? graph.shadetop1 : !graph.shadetop1, graph.dasharray1 === "- " ? false : true, graph.pointC.coord, graph.pointD.coord, graph.pointC.coord > graph.pointD.coord ? graph.shadetop2 : !graph.shadetop2, graph.dasharray2 === "- " ? false : true ]
var slope1 = ( guess - guess ) / ( guess - guess ); var yint1 = slope1 * ( 0 - guess ) + guess; var slope2 = ( guess - guess ) / ( guess - guess ); var yint2 = slope2 * ( 0 - guess ) + guess; return (abs(SLOPE_1 - slope1) < 0.001 && abs(YINT_1 - yint1) < 0.001 && guess === LESS_THAN_1 && guess === INCLUSIVE_1 && abs(SLOPE_2 - slope2) < 0.001 && abs(YINT_2 - yint2) < 0.001 && guess === LESS_THAN_2 && guess === INCLUSIVE_2) || (abs(SLOPE_2 - slope1) < 0.001 && abs(YINT_2 - yint1) < 0.001 && guess === LESS_THAN_2 && guess === INCLUSIVE_2 && abs(SLOPE_1 - slope2) < 0.001 && abs(YINT_1 - yint2) < 0.001 && guess === LESS_THAN_1 && guess === INCLUSIVE_1);
graph.pointA.setCoord( guess ); graph.pointB.setCoord( guess ); graph.pointC.setCoord( guess ); graph.pointD.setCoord( guess ); graph.shadetop1 = graph.pointA.coord > graph.pointB.coord ? guess : !guess; graph.shadetop2 = graph.pointC.coord > graph.pointD.coord ? guess : !guess; if ( guess ) { graph.dasharray1 = ""; $( "input[name=dashradio1][value=solid]" ).attr( "checked", true ); } else { graph.dasharray1 = "- ";$( "input[name=dashradio1][value=dashed]" ).attr( "checked", true ); } if ( guess ) { graph.dasharray2 = ""; $( "input[name=dashradio2][value=solid]" ).attr( "checked", true ); } else { graph.dasharray2 = "- ";$( "input[name=dashradio2][value=dashed]" ).attr( "checked", true ); } graph.update();
graph the inequalities
make sure the correct sides are shaded
make sure each line is correctly shown as solid or dashed

Convert the first inequality, expr([ "+", [ "*", A_1, "x" ], [ "*", B_1, "y" ] ]) STD_FORM_COMP_1 C_1, to slope-intercept form by solving for y.

A_1 < 0 ? "Add" : "Subtract" abs( A_1 )x A_1 < 0 ? "to" : "from" both sides:

\qquad expr( [ "*", B_1, "y" ] ) STD_FORM_COMP_1 expr([ "+", [ "*", -A_1, "x" ], C_1 ])

Divide both sides by B_1. Since you're multiplying or dividing by a negative number, don't forget to flip the inequality sign:

\qquad y COMP_1 expr([ "+", "\\dfrac{" + expr([ "*", -A_1, "x" ]) + "}{" + B_1 + "}", "\\dfrac{" + C_1 + "}{" + B_1 + "}" ])

\qquad y COMP_1 \color{purple}{PRETTY_SLOPE_1} x \color{gray}{+ YINT_1}

The y-intercept is YINT_1 and the slope is decimalFraction( SLOPE_1, true, true ). Since the y-intercept is YINT_1, the line must pass through the point (0, YINT_1).

The slope is decimalFraction( SLOPE_1, true, true ). Remember that the slope tells you rise over run. So in this case for every abs( SLOPE_FRAC_1 ) "position" + ( abs( SLOPE_FRAC_1 ) !== 1 ? "s" : "" ) you move down (because it's negative) up you must also move SLOPE_FRAC_1 "position" + ( abs( SLOPE_FRAC_1 ) !== 1 ? "s" : "" ) to the right. So the line must also pass through (SLOPE_FRAC_1, YINT_1 + SLOPE_FRAC_1)

Since our inequality has a LESS_THAN_1 ? "less-than" : "greater-than"INCLUSIVE_1 ? " or equal to" : "" sign, that means that any point LESS_THAN_1 ? "below" : "above" the line is a solution to the inequality, so the area LESS_THAN_1 ? "below" : "above" the line should be shaded.

Note that since the sign is LESS_THAN_1 ? "less-than" : "greater-than" or equal to, any point on the line is also a solution, so the line should be solid.

Note that since the sign is LESS_THAN_1 ? "less-than" : "greater-than" (and not equal to), any point on the line is not part of the solution, so the line should be dashed to indicate this.

Convert the second inequality, expr([ "+", [ "*", A_2, "x" ], [ "*", B_2, "y" ] ]) STD_FORM_COMP_2 C_2, to slope-intercept form by solving for y.

A_2 < 0 ? "Add" : "Subtract" abs( A_2 )x A_2 < 0 ? "to" : "from" both sides:

\qquad expr( [ "*", B_2, "y" ] ) STD_FORM_COMP_2 expr([ "+", [ "*", -A_2, "x" ], C_2 ])

Divide both sides by B_2. Since you're multiplying or dividing by a negative number, don't forget to flip the inequality sign:

\qquad y COMP_2 expr([ "+", "\\dfrac{" + expr([ "*", -A_2, "x" ]) + "}{" + B_2 + "}", "\\dfrac{" + C_2 + "}{" + B_2 + "}" ])

\qquad y COMP_2 \color{purple}{PRETTY_SLOPE_2} x \color{gray}{+ YINT_2}

The y-intercept is YINT_2 and the slope is decimalFraction( SLOPE_2, true, true ). Since the y-intercept is YINT_2, the line must pass through the point (0, YINT_2).

The slope is decimalFraction( SLOPE_2, true, true ). Remember that the slope tells you rise over run. So in this case for every abs( SLOPE_FRAC_2 ) "position" + ( abs( SLOPE_FRAC_2 ) !== 1 ? "s" : "" ) you move down (because it's negative) up you must also move SLOPE_FRAC_2 "position" + ( abs( SLOPE_FRAC_2 ) !== 1 ? "s" : "" ) to the right. So the line must also pass through (SLOPE_FRAC_2, YINT_2 + SLOPE_FRAC_2)

Since our inequality has a LESS_THAN_2 ? "less-than" : "greater-than"INCLUSIVE_2 ? " or equal to" : "" sign, that means that any point LESS_THAN_2 ? "below" : "above" the line is a solution to the inequality, so the area LESS_THAN_2 ? "below" : "above" the line should be shaded.

Note that since the sign is LESS_THAN_2 ? "less-than" : "greater-than" or equal to, any point on the line is also a solution, so the line should be solid.

Note that since the sign is LESS_THAN_2 ? "less-than" : "greater-than" (and not equal to), any point on the line is not part of the solution, so the line should be dashed to indicate this.