Graph of y = 2
The graph of y = 2 is a horizontal line that crosses the y-axis at 2. Every point on it has a y-coordinate of 2, whatever x is, so its slope is 0.
Key features
- Domain
- All real numbers
- Range
- y = 2 only
- Slope
- 0
- Direction
- Horizontal
- x-intercept
- None: the line never reaches the x-axis
- y-intercept
- (0, 2)
- Derivative
- 0
- Antiderivative
- 2x + C
Derivative and antiderivative from the calculator’s algebra system. Domain, range and asymptotes are stated for real x.
What the graph of 2 looks like
The equation says y is always 2, and it doesn’t mention x at all. So x can be anything, and the graph runs flat across the whole plane at a height of 2.
Don’t confuse it with x = 2, which is a vertical line. Horizontal lines fix y, and vertical lines fix x. A horizontal line is a function (a constant one), but a vertical line isn’t.
Every horizontal line has a slope of 0, because there is no rise for any amount of run.
Points of interest
Found numerically to about twelve digits in the window −6 ≤ x ≤ 6, then shown in exact form where one exists.
- x-intercepts (roots)
- None in this window
- Local maxima
- None in this window
- Local minima
- None in this window
- Inflection points
- (−6, 2), (−5.997, 2), (−5.994, 2), (−5.991, 2), (−5.988, 2), (−5.985, 2) … (4001 in view)
Table of values
A few points to plot, with exact values where they are simple.
| x | y = 2 |
|---|---|
| −2 | 2 |
| −1 | 2 |
| 0 | 2 |
| 1 | 2 |
| 2 | 2 |
| 3 | 2 |
How to graph 2 by hand
- 1Find 2 on the y-axis.
- 2Draw a straight horizontal line through that point, running in both directions.
- 3Add arrows on the ends to show that it continues forever.
Transformations
How the graph moves when you change the formula. The original is 2 in blue.
y = 4Moved up by 2.y = 0Moved down by 2.
Common mistakes
- Drawing a vertical line. That is x = 2.
- Thinking there is no equation because x is missing. There is: y simply doesn’t depend on x.
Frequently asked questions
Is y = 2 a function?
What is the slope of y = 2?
Is y = 2 horizontal or vertical?
Related graphs
A horizontal line through (0, 3).
Slope 1, crossing the y-axis at 0.
Slope 2, crossing the y-axis at 0.
Slope 3, crossing the y-axis at 0.
Slope 4, crossing the y-axis at 0.
A straight line: slope m, y-intercept b.
Change the window, add sliders for a, b, h and k, trace the curve with your keyboard, or overlay its derivative.