What is the inequality represented by this graph?
y
COMP
SLOPE
\space x +
YINT
To find the equation of a linear inequality you should first find the equation of the line that forms the boundary of the solution set. This line is shown on the graph above.
One way to find the equation of this line is to choose two points on the line and find the slope and y-intercept from there.
Two points on this line are (X1,Y1)
and (X2,Y2)
.
Substitute both points into the equation for the slope of a line.
m = \dfrac{Y2 - negParens(Y1)}{X2 - negParens(X1)} = fractionReduce( Y2 - Y1, X2 - X1 )
To find b
, we can substitute in either of the two points into the equation with solved slope.
Using the first point (X1, Y1)
, substitute y = Y1
and x = X1
:
Y1 = (fractionReduce( Y2 - Y1, X2 - X1 ))(X1) + b
b = Y1 - fractionReduce( X1 * ( Y2 - Y1 ), X2 - X1 ) = fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 )
The equation of the line is y = ( SLOPE === -1 ? "-" : ( SLOPE === 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ))) x + fractionReduce( Y1 * (X2 - X1) - X1 * ( Y2 - Y1 ), X2 - X1 )
(the value of m
is SLOPE
).
Now that we have the equation for the boundary line, we need to decide which inequality sign to use.
If we pick a point on the line, let's say (X1,Y1)
, we can see that points below that point are all shaded in. These are the points where x = X1
but y
is
less than Y1
. So we should use a <
or ≤
sign.
If we pick a point on the line, let's say (X1,Y1)
, we can see that points above that point are all shaded in. These are the points where x = X1
but y
is
greater than Y1
. So we should use a >
or ≥
sign.
Another way to see this is to try plugging in a point. The easiest point to plug in is (0,0)
:
y \; ? \; coefficient(fractionReduce(Y2 - Y1, X2 - X1))x + fractionReduce(Y1 * (X2 - X1) - X1 * (Y2 - Y1), X2 - X1)
0 \; ? \; ( SLOPE === -1 ? "-1 \\times" : ( SLOPE === 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ) + "\\times")) 0 + fractionReduce(Y1 * (X2 - X1) - X1 * (Y2 - Y1), X2 - X1)
Since (0, 0)
is in the shaded area, this expression must be true.
Since (0, 0)
is not in the shaded area, this expression must be false.
So, the ?
must be either <
or ≤
.
So, the ?
must be either >
or ≥
.
The line of the graph is solid, so the points on the boundary are in the set of solutions for this inequality.
The line of the graph is dashed, so the points on the boundary are not in the set of solutions for this inequality.
So, we choose the COMP sign, and the final inequality is
y COMP PRETTY_SLOPE + YINT
.