Skip to main content

Horizontal line

A horizontal line is a straight line with the equation y = c, where c is constant. In College Algebra, it has slope 0 and is parallel to the x-axis.

Last updated July 2026•Fiveable Content Team

What is horizontal line?

A horizontal line in College Algebra is a line that stays at one y-value the whole time. Every point on it has the same output, so its equation looks like y = c, where c is a constant number such as y = 4 or y = -2.

The easiest way to picture it is to think of a graph that never goes up or down as x changes. The line can stretch left and right forever, but the height stays fixed. That is why horizontal lines are parallel to the x-axis.

Its slope is 0. Slope measures change in y divided by change in x, and a horizontal line has no change in y at all. If you move to the right, you are not rising or falling, so the rise over run is 0 over some nonzero number, which gives 0.

A common example is y = 3. No matter what x is, the y-value is always 3. The graph crosses the y-axis at (0, 3), but that point is not special because of the x-value. It is special because every point on the line has that same y-coordinate.

In College Algebra, horizontal lines show up in graphing, function notation, and equation writing. They are also a quick way to spot a constant function, since a constant function outputs the same value for every input. If you see a flat graph, you are looking at a horizontal line, and if the equation has no x-term at all, you are probably looking at one too.

One easy mistake is to mix up horizontal and vertical lines. Horizontal lines look like y = c, while vertical lines look like x = c. The difference matters because only horizontal lines have slope 0, and vertical lines do not have a defined slope at all.

Why horizontal line matters in College Algebra

Horizontal lines show up any time College Algebra asks you to connect an equation to a graph. If you can recognize y = c right away, you can sketch the line, name its slope, and identify its y-intercept without guessing.

They also connect directly to functions. A horizontal line represents a constant output, so it matches the idea of a constant function. That makes it a good checkpoint when you are deciding whether a graph changes, whether a table has the same output every time, or whether an equation describes a flat relationship.

This idea also sets you up for the Horizontal Line Test later in the course. That test uses horizontal lines to check whether a graph is one-to-one, so knowing what a horizontal line looks like is not just a graphing skill, it is a tool for studying inverses.

If you are solving equations, a horizontal line can appear as the graph of a linear equation with no x-term, or as a target when you are finding where a graph reaches a certain y-value. That makes it a small concept with a lot of reach across linear equations and functions.

Keep studying College Algebra Unit 4

Official unit cheatsheet

open one-pager

How horizontal line connects across the course

Slope

A horizontal line has slope 0 because the y-value never changes as x increases. That makes it a useful special case when you are practicing slope from a graph or from two points. If your slope calculation gives 0, you are describing a flat line, not a line that is barely tilted.

Vertical Line

Horizontal and vertical lines are the two basic line types students mix up most often. A horizontal line has the form y = c and slope 0, while a vertical line has the form x = c and no defined slope. The variables matter here, since one fixes y and the other fixes x.

Constant Function

A constant function graphs as a horizontal line because the output stays the same for every input. For example, f(x) = 5 produces the line y = 5. When you are given a table or graph, checking whether the output never changes is a fast way to spot a constant function.

Slope-Intercept Form

Slope-intercept form, y = mx + b, makes horizontal lines easy to identify when m = 0. Then the equation becomes y = b, which is exactly a horizontal line. This is one of the cleanest examples of how slope and intercept work together in linear equations.

Is horizontal line on the College Algebra exam?

A quiz problem might ask you to graph y = -3, name its slope, or decide whether a pictured line is horizontal or vertical. You may also get a word problem where a quantity stays fixed, and the graph should be a horizontal line because the output does not change. In function questions, a horizontal line tells you the function is constant, and in graph analysis, you can use it to spot the y-intercept quickly. If the course covers inverses, you may also be asked to use a horizontal line as part of the Horizontal Line Test and say whether a graph is one-to-one.

Horizontal line vs Vertical Line

Horizontal lines run left to right and have equations like y = c, while vertical lines run up and down and have equations like x = c. The slope difference is the big giveaway: horizontal lines have slope 0, but vertical lines have undefined slope because the run is 0. If you mix them up, check which coordinate stays fixed.

Key things to remember about horizontal line

  • A horizontal line has the equation y = c, where c is a constant.

  • Its slope is 0 because there is no vertical change as you move along the line.

  • Horizontal lines are parallel to the x-axis and cross the y-axis at (0, c).

  • A constant function graphs as a horizontal line, since the output stays the same for every input.

  • The Horizontal Line Test uses horizontal lines to check whether a graph is one-to-one.

Frequently asked questions about horizontal line

What is a horizontal line in College Algebra?

A horizontal line is a line with a constant y-value, written as y = c. In College Algebra, it represents a flat graph where the output never changes. Its slope is 0, and it is parallel to the x-axis.

What is the equation of a horizontal line?

The equation of a horizontal line is y = c, where c is any constant number. For example, y = 2 and y = -5 are both horizontal lines. The x-values can change, but the y-value stays the same every time.

How do you find the slope of a horizontal line?

The slope of a horizontal line is always 0. That is because slope measures rise over run, and a horizontal line has no rise. If you calculate slope from two points on the line, the y-values will be the same, so the numerator becomes 0.

How is a horizontal line different from a vertical line?

A horizontal line keeps y constant, while a vertical line keeps x constant. Horizontal lines have slope 0, but vertical lines do not have a defined slope. This is one of the most common graphing mix-ups in College Algebra.