"""
Given the three vertices, (0, 0), (1, 0), and (0, 1),
we can connect them with equations.
Since (0, 0) and (0, 1) are both on the y-axis, the
equation that connects them is simply x = 0. Similarly,
since (0, 0) and (1, 0) are both on the x-axis, the
equation that connects them is simply y = 0.
[Note, these equations are true for all values of y
and x, respectively, but since we're only considering
them between two point they should really be bounded
by the points, 0<= y <= 1 and 0 <= x <=0, respectively,
however we don't emphasize that here.]
To find the equation that connects the point (1, 0) and
(0, 1) we must involve a bit more algebra. Namely, the
point-slope intercept form of a linear equation:
y - y1 = m * (x - x1), where m = (y2 -y1) / (x2 - x1)
and (x1, y1) and (x2, y2) are some points on the line.
Let (x1, y1) = (0, 1), that is, x1 = 0 and y1 = 1, and
(x2, y2) = (1, 0), that is, x2 = 1 and y2 = 0. Then,
substituting these values into the equation:
y - y1 = m * (x - x1),
y - y1 = [ (y2 -y1) / (x2 - x1) ] * (x - x1),
y - (1) = [ (0 - 1) / (1 - 0) ] * (x - 0),
y - 1 = [ -1 / 1 ] * x,
y - 1 = -1 * x,
y = -x + 1.
I have put all of this together in Desmos for you as well:
https://www.desmos.com/calculator/hihrsrx62i
Please feel free to play with the Desmos file and modify
it as necessary. Let me know if you need further help with
the question.
All the best!
"""