Explain Constant function with graph

<h1><span style="font-family:Times New Roman,Times,serif"><span style="font-size:16pt"><span style="color:#365f91"><strong>What is Constant function?</strong></span></span></span></h1>
<p><span style="font-family:Times New Roman,Times,serif"><span style="font-size:11pt"><span style="color:black">In this lesson, we will get the right understanding on what a constant function is and what it looks like on a graph. We will become comfortable identifying constant functions through real-world and mathematical examples.</span></span></span></p>
<h2><span style="font-family:Times New Roman,Times,serif"><span style="font-size:14pt"><span style="color:#17365d"><strong><span style="font-size:16.0pt">What is a Constant Function?</span></strong></span></span></span></h2>
<p><span style="font-family:Times New Roman,Times,serif"><span style="font-size:11pt"><span style="color:black">Have you ever been shopping and you see a bargain bin, like the one pictured, where everything in the bin is a set price? If you have, lucky you for finding an awesome sale, but not only that, you actually came across a relationship between the items in that bin and their price that is an example of a constant function. </span></span></span></p>
<p><span style="font-family:Times New Roman,Times,serif"><span style="font-size:12pt"><span style="font-size:11.0pt"><span style="color:black">Mathematically, a constant function happens to be a function that has the same output value no matter what your input value is. So, for this, a constant function has the form <em>y</em> = <em>b</em>, where <em>b</em> is a constant (a single value that does not change). We can take an example like <em>y</em> = 7 or <em>y</em> = 1,094 are constant functions. No matter what input, or <em>x</em>-value is, the output, or <em>y</em>-value is always the same. </span></span></span></span></p>
<p><span style="font-family:Times New Roman,Times,serif"><span style="font-size:12pt"><span style="font-size:11.0pt"><span style="color:black">To simplify this even further, let&#39;s consider how to tell the difference between a constant function, and a function that is not a constant function. To decide if a function is a constant function, ask yourself, is it possible to get different outputs by using different inputs? If you can do that, then you do not have a constant function, but if it&#39;s only possible to get the same output no matter what you put in, then you have a constant function. </span></span></span></span></p>
<p><span style="font-family:Times New Roman,Times,serif"><span style="font-size:12pt"><span style="font-size:11.0pt"><span style="color:black">For example, think about the function <em>y</em> = <em>x</em> + 4. Can we get different outputs by varying our inputs? In this example, the answer is yes, because if I input <em>x</em> = 1, I get <em>y</em> = 1 + 4 or <em>y</em> = 5, and if I input <em>x</em> = 2, then I get <em>y</em> = 2 + 4 or <em>y</em> = 6. Since we can get different outputs by varying our inputs, this is not a constant function. </span></span></span></span></p>
<p><span style="font-family:Times New Roman,Times,serif"><span style="font-size:12pt"><span style="font-size:11.0pt"><span style="color:black">Now consider the function <em>y</em> = 7. Notice that no matter what our <em>x</em> value, or input, is, <em>y</em> is ALWAYS 7. If <em>x</em> = 3, <em>y</em> = 7 or if <em>x</em> = 5, <em>y</em> = 7 ; <em>y </em>is always 7 no matter what our input is. Therefore, we can&#39;t get different outputs by varying inputs, and that means this is a constant function. </span></span></span></span></p>
<p><span style="font-family:Times New Roman,Times,serif"><span style="font-size:12pt"><span style="font-size:11.0pt"><span style="color:black">You may wonder what a constant function would look like on a graph. Well, if you&#39;ve ever seen a horizontal line, then you&#39;ve seen the graph of a constant function. Let&#39;s think about why this is the case. Graphically speaking, a constant function, <em>y</em> = <em>b</em>, has a <em>y</em>-value of <em>b</em> everywhere. This means there is no change in the <em>y</em> value, so the graph stays constantly on <em>y</em> = <em>b</em>, forming a horizontal line. </span></span></span></span></p>
<p><span style="font-family:Times New Roman,Times,serif"><span style="font-size:12pt"><span style="font-size:11.0pt"><span style="color:black">Consider our example of <em>y</em> = 7. The points on this graph all have a <em>y</em>-value of 7. For instance, (-2, 7), (0, 7), (7, 7), (1000, 7), and (-1000, 7) are all on this graph. When we graph all these points, we see that we get horizontal lines.</span></span></span></span></p>
<p><span style="font-family:Times New Roman,Times,serif"><img alt="constant function" src="https://d10lpgp6xz60nq.cloudfront.net/engagement_framework/6FF29328-5E87-D7B9-5E3B-5088684C943F.webp" style="height:160px; width:250px" /></span></p>
<p><span style="font-family:Times New Roman,Times,serif"><span style="font-size:11pt"><span style="color:black">Now that we are starting to feel more comfortable with what a constant function is, let&#39;s look back at our bargain bin example, specifically, the photo of the books all costing $3.99. In this example, our input would be any book in that bin, and our output would be the cost. No matter what book we take out of that bin, the corresponding cost is $3.99. We see that this is a constant function which provides us a clear view about it.</span></span></span></p>