# you cant graph line segments

or can you...

##### well, no, you cant. not with a normal equation, at least.

on most, if not all TI calculators, there is a button labeled "TEST".

the menu contains comparators such as `<` and `>`, but it also has a LOGIC tab.

this gives you access to conditional operators, like `and` and `or`.

since these will either return `1` (`true`) or `0` (`false`), they can cut off lines at certain points.

##### it's that easy.
• horizontal lines:
• these are extremely easy to make, because you just need to have two comparisons and one condition.
• `X>-5 and X<5`
• that equation draws a line from `(-5, 1)` to `(5, 1)`.
• to offset this line, simply wrap the in parenthesis and multiply it by anything. this works because when the condition is `0` (`false`), nothing will happen.
• `(X>-5 and X<5)5`
• diagonal lines:
• diagonals are similar to straight lines, except that they stretch across multiple Y values.
• to accomplish this, just replace the multiplier with an equation.
• `(X>-5 and X<0)(X+5)`
• to offset this, add the original equation to the end of the equation.
• `(X>-5 and X<0)(X+5)+(X>-5 and X<0)`
• `(X>-5 and X<0)(X+5)+(X>-5 and X<0)2`
• vertical lines:
• these are straight up impossible.
• you cannot have two different Y values for any given X, or it is not a valid function.
• unless...
• `Y1=(X>1 and X<1.25)`
`Y2=(X>1 and X<1.25)1.25`
`Y3=(X>1 and X<1.25)1.5`
`Y4=(X>1 and X<1.25)1.75`
`Y5=(X>1 and X<1.25)2`
`Y6=(X>1 and X<1.25)2.25`
`Y7=(X>1 and X<1.25)2.5`
`Y8=(X>1 and X<1.25)2.75`
`Y9=(X>1 and X<1.25)3`
• (`0.25` is the default margin of each marker)

##### drawing a triangle

putting a horizontal line and 2 diagonal lines together will make a triangle. simple as that.

`Y1=(X>-5 and X<5)`
`Y2=(X>-5 and X<0)(X+5)+(X>-5 and X<0)`
`Y3=(X>0 and X<5)(-X+5)+(X>0 and X<5)`