It is probably the easiest function which we'll ever graph and still it is one of the functions which tend to cause problems for students.
The most general form for the constant function is following,
f ( x ) = c
where c refer to some number.
Let's take a look at f (x ) = 4 hence we can see what the graph of constant functions look like.
Probably the biggest problem with these functions is that there is no x on the right side to plug into for evaluation. Though, that means is that there is no substitution to do. In other terms, no matter what x we plug to the function always we will obtain a value of 4 (or c in the general case) out of the function.
Thus, every point contains a y coordinate of 4. It is exactly what describes a horizontal line. Actually, if we recall that as, f (x) is nothing more than a fancy way of writing y we can rewrite the function
y = 4
And it is exactly the equation of a horizontal line.
Here is the graph of this function.