The following line passes through point (X1, Y1):
y = fractionReduce(SLOPE_NUMERATOR, SLOPE_DENOMINATOR) x + b
What is the value of the y-intercept b?
b = (Y1 * SLOPE_DENOMINATOR - X1 * SLOPE_NUMERATOR) / SLOPE_DENOMINATOR
Substituting (X1, Y1) into the equation gives:
Y1 = fractionReduce(SLOPE_NUMERATOR, SLOPE_DENOMINATOR) \cdot X1 + b
Y1 = fractionReduce(X1 * SLOPE_NUMERATOR , SLOPE_DENOMINATOR) + b
b = Y1 - fractionReduce(X1 * SLOPE_NUMERATOR , SLOPE_DENOMINATOR)
b = fractionReduce(Y1 * SLOPE_DENOMINATOR - X1 * SLOPE_NUMERATOR, SLOPE_DENOMINATOR)
Plugging in fractionReduce(Y1 * SLOPE_DENOMINATOR - X1 * SLOPE_NUMERATOR, SLOPE_DENOMINATOR) for b, we get y = fractionReduce(SLOPE_NUMERATOR, SLOPE_DENOMINATOR) x + fractionReduce(Y1 * SLOPE_DENOMINATOR - X1 * SLOPE_NUMERATOR, SLOPE_DENOMINATOR).
Given the line:
expr(["*", X_COEFF, "x"]) + expr(["*", Y_COEFF, "y"]) = EQUALS
What is the y-intercept?
\large(0,\ Y_INTERCEPT\large)
The y-intercept is the point where the line crosses the y-axis. This happens when x is zero.
Set x to zero and solve for y:
X_COEFF(0) + expr(["*", Y_COEFF, "y"]) = EQUALS
expr(["*", Y_COEFF, "y"]) = EQUALS
\dfrac{Y_COEFFy}{Y_COEFF} = \dfrac{EQUALS}{Y_COEFF}
y = Y_INTERCEPT
The line intersects the y-axis at (0, Y_INTERCEPT).