If you want a horizontal line, the Y-intercept will ALWAYS be the same. Graph it to see.

So, for a horizontal like, y must always be the same. So lets make y=4. You would plot (0,4) because that is the y-intercept. That would be your equation-- y=4.

Same for x. X will be a vertical line, because the x-intercept will always be the same. So make x=-2 for example. Make a vertical line, and you will notice that if x=-2, x will ALWAYS be -2 for that line. Your equation would be x=-2.

Remember, a vertical line has a slope of 1/0, and you cannot divide by zero, so a vertical line is undefined.

Hope I helped!