# Khan/khan-exercises

Fetching contributors…
Cannot retrieve contributors at this time
285 lines (272 sloc) 16.5 KB
 Equations of parallel and perpendicular lines
randRangeNonZero( -3, 3 ) / randRange( 1, 3 ) M > 0 ? "" : "-" M > 0 ? "-" : "" decimalFraction( M, "true", "true" ) decimalFraction( -1 / M, "true", "true" ) randRange( -5, 5 ) randRange( 2, 8 ) * randRangeNonZero( -1, 1 ) randRange( 2, 8 ) * randRangeNonZero( -1, 1 ) "perpendicular"

Find the slope and y-intercept of the line that is \green{\text{LINE_TYPE}} to \blue{y = M_FRAC M_SIGNx + B} and passes through the point \red{(X, Y)}.

graphInit({ range: [[-10, 10], [-10, 10]], scale: [18, 18], tickStep: 1, labelStep: 1, unityLabels: false, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); plot(function( x ) { return ( M * x + B ); }, [-10, 10], { stroke: BLUE }); circle( [X, Y], 1/4, { stroke: "none", fill: "#ff0000" } );

m = -1 / M

b = Y - ( -1 / M * X )

Lines are considered perpendicular if their slopes are negative reciprocals of each other.

The slope of the blue line is \blue{M_FRAC}, and its negative reciprocal is \green{M_PERP_FRAC}.

Thus, the equation of our perpendicular line will be of the form \green{y = M_PERP_FRACM_PERP_SIGNx + b}.

We can plug our point, (X, Y), into this equation to solve for \green{b}, the y-intercept.

Y = \green{M_PERP_FRACM_PERP_SIGN}(X) + \green{b}

Y = decimalFraction( -1 / M * X, "true", "true" ) + \green{b}

Y - decimalFraction( -1 / M * X, "true", "true" ) = \green{b} = decimalFraction( Y - ( -1 / M * X ), "true", "true" )

The equation of the perpendicular line is \green{y = M_PERP_FRAC M_PERP_SIGNx + decimalFraction( Y - ( -1 / M * X ), "true", "true" )}.

So \green{m = decimalFraction( -1 / M, "true", "true" )} and \green{b = decimalFraction( Y - ( -1 / M * X ), "true", "true" )}.

plot(function( x ) { return ( -1 / M * x + ( Y - ( -1 / M * X ) ) ); }, [-10, 10], { stroke: GREEN });
"parallel" randRange( 2, 8 ) * randRangeNonZero( -1, 1 ) randRange( 2, 8 ) * randRangeNonZero( -1, 1 )

m = M

b = Y - M * X

Parallel lines have the same slope.

The slope of the blue line is \blue{M_FRAC}, so the equation of our parallel line will be of the form \green{y = M_FRACM_SIGNx + b}.

We can plug our point, (X, Y), into this equation to solve for \green{b}, the y-intercept.

Y = \green{M_FRACM_SIGN}(X) + \green{b}

Y = decimalFraction( M * X, "true", "true" ) + \green{b}

Y - decimalFraction( M * X, "true", "true" ) = \green{b} = decimalFraction( Y - M * X, "true", "true" )

The equation of the parallel line is \green{y = M_FRAC M_SIGNx + decimalFraction( Y - M * X, "true", "true" )}.

So \green{m = decimalFraction( M, "true", "true" )} and \green{b = decimalFraction( Y - M * X, "true", "true" )}.

plot(function( x ) { return ( M * x + ( Y - M * X ) ); }, [-10, 10], { stroke: GREEN });
randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) A1 * F B1 * F C1 * F expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1 expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2

What do the following two equations represent?

EQ1

EQ2

Equal lines
• Equal lines
• Parallel lines
• Perpendicular lines
• None of the above
init({ range: [[-10, 10], [-10, 10]], scale: [20, 20] }); grid( [-10, 10], [-10, 10], { stroke: "#ccc" }); style({ stroke: "#888", strokeWidth: 2, arrows: "->" }); path( [ [-10, 0], [10, 0] ] ); path( [ [0, -10], [0, 10] ] ); style({ stroke: "#6495ED", arrows: null }); plot( function( x ) { return ( C1 / B1 ) - ( A1 / B1 ) * x; }, [-10, 10]);

Putting the first equation in y = mx + b form gives:

expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1

expr(["*", B1, "y"]) + " = " + expr(["+", ["*", (-1 * A1), "x"], C1])

"y = " + fractionReduce( -A1, B1 ) + "x + " + fractionReduce( C1, B1 )

plot( function( x ) { return ( C2 / B2 ) - ( A2 / B2 ) * x; }, [-10, 10]);

Putting the second equation in y = mx + b form gives:

expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2

expr(["*", B2, "y"]) + " = " + expr(["+", ["*", (-1 * A2), "x"], C2])

"y = " + fractionReduce( -A2, B2 ) + "x + " + fractionReduce( C2, B2 )

randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1 expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2
None of the above

The slopes are not the same, so the lines are not equal or parallel. The slopes are not negative inverses of each other, so the lines are not perpendicular. The correct answer is none of the above.

randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) A1 * F B1 * F C1 * F expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1 expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2
Equal lines

So the two equations describe equal lines.

randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) A1 * F B1 * F randRange( -5, 5 ) expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1 expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2
Parallel lines

The slopes are equal, and the y-intercepts are different, so the lines are parallel.

randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRange( 1, 5 ) -1 * B1 * F A1 * F randRangeNonZero( -5, 5 ) expr(["+", ["*", A1, "x"], ["*", B1, "y"]]) + " = " + C1 expr(["+", ["*", A2, "x"], ["*", B2, "y"]]) + " = " + C2
Perpendicular lines

The slopes are negative inverses of each other, so the lines are perpendicular.