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)}
.
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" )}
.
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" )}
.
What do the following two equations represent?
EQ1
EQ2
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 )
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 )
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.
So the two equations describe equal lines.
The slopes are equal, and the y-intercepts are different, so the lines are parallel.
The slopes are negative inverses of each other, so the lines are perpendicular.