← Back to Home

Graphs and Functions

1.1 Lines/Curves and Functions

Let's get into lines and curves. Where do you typically see them? On graphs.

For example, look at the graph shown below:

Graph by desmos showing the line y=x. The horizontal line is labeled as the x-axis and the vertical line is labelled as the y-axis. Finally, the y=x graph line is simply labelled as line.

You can notice that when $x$ is $1$, $y$ is $1$. When $x$ is $2$, $y$ is $2$. When $x$ is $-0.5$, $y$ is also $-0.5$. In fact, for this particular line, $y$ will always equal $x$, hence the line can be rewritten as $y=x$. Another thing to keep in mind is: $x$ is the horizontal axis, while $y$ is the vertical axis.

On graphs, the line represents some kind of relationship between $x$ (the thing you typically want to change) and $y$ (the thing generally dependent on $x$). The usual expression is $y= …$, where the left hand side is dependent on the right hand side.

Functions are similar. They are used as a relationship between $x$ (again, the thing you typically change) and $f(x)$ (the thing dependent on $x$). The usual expression is $f(x)= …$, where the left hand side is dependent on the right hand side.

Since the definitions are very similar:

Can you draw every function on a graph? ▼

For the purposes of Calculus 1, yes! This is why you will usually see $y = …$ and $f(x) = …$ used interchangeably when you graph some things. As you advance more in mathematics, you may encounter some crazy functions that may break this rule, but this is not within the scope of our notes.

Can you turn every graph into a function? ▼

No, not all of them. Why? Because functions have a special rule: every $x$ value must correspond to only 1 $y$ value.

For example, here is the classical equation of a circle with a picture: $x^2+y^2=1$

The image shows a graph by desmos of a circle with the equation x^2 + y^2 = 1, which is basically a circle that goes from y=1 to y=-1 and x=1 to x=-1.

Let us pick $x = 0.5$. How many $y$ values are possible with that specific $x$ value? Look at the image below:

In this image, we have the same desmos graph of the circle x^2 + y^2 =1. I drew a black dot on the point (0.5,0), with a vertical blue line emerging from that black dot until it touches the circle from the inside. Next, I drew cyan horizontal lines that extended from that blue-line-and-graph intersection to the left until they touched the y-axis.

As you can see, this $x$ value corresponds to 2 different $y$ values. In other words, if I draw a vertical line at $x = 0.5$, I intersect the circle at 2 different points, hence $x^2+y^2=1$ is not a function.

Tip: Try the vertical line test (drawing a vertical line and seeing if it intersects your equation at more than one point) to see if the graph shown to you is a function or not.

There are some other terms that you are sometimes expected to know when you are look at graphs, such as (Note: The horizontal line test: draw a horizontal line to decide which type of graph are you looking at):

  • One-to-one: 1 $y$ value corresponds to only 1 $x$.
    Example:
    Straight line graph by desmos where each y value corresponds to only 1 specific x value. Pick any $y$ value, you will notice there is only 1 $x$ value that can give you that $y$ value.
  • Many-to-one: You can get the same $y$ value from 2 or more $x$ values (this is still a function).
    Example:
    A curved graph by desmos with all y values above 0 corresponding to 2 different axis values. Pick a $y$ value (should be above 0 in this example), you will notice you can get it from 2 different $x$ values.
    Draw a horizontal line. You will notice it intersects the curve at more than 1 point. However, this is still a function because it passes the vertical line test.

1.2 More stuff about functions

Assume that $f(x)=2x^2+3x+12$. What does $f(1)$ mean? It means that in the original expression of $f(x)=2x^2+3x+12$, everywhere you see an $x$, replace with a $1$.

So, $f(1)=2(1)^2+3(1)+12=2+3+12=17$.

This will get quite handy later on.


Keep in mind, a function can be made from several equations (called a piece-wise function, because it's broken into pieces). For example, I can say that when my $x$ values are less than $3$ (mathematically, written as $<3$), my function would have the equation $x^2$, but when my $x$ values are greater than or equal to $3$ (written as $\ge3$), my function would have the equation $x^3$.

This function would be written as

Hand drawn image of the piecewise function of f(x), where f(x)= x^2 when x is less than 3, and f(x)=x^3 when x is greater than or equal to 3.

Note: It is not necessary that a function is depicted using $f(x)$, you can use any symbol instead of $f$, such as $g$, $h$, $v$, $a$, etc.

Moving on, you should know what a variableVariableA value that can change. We generally express variables in the form of letters. For example, the equation $f(x)=x+7$ has a lot of different answers depending on what $x$ is. If $x$ is $21$, then $21+7=28$. is.

More stuff about graphs, lines, and curves

Here are some examples of some common lines (if the line is not straight, it is called a curve) you will see throughout your math journey:

  • $y=\frac{1}{x}$
    Graph of y=1/x by desmos
  • $y=4$ (basically $y$ is equal to a constant value, something that doesn't depend on $x$)

    Calculus I - More stuff about graphs, lines, and curves: figure 2. A straight line graph by desmos of y=4.


The general expression of a straight line is as follows:

$$y=mx+b$$

  • $m$ - represents the slope of the line
  • $x$ - represents the $x$ value at a specific point
  • $b$ - this is known as the $y$-intercept value - the $y$ value where the line intersects the $y$-axis

Keep in mind: in the equation $y=mx+b$, $y$ is called the subject of this equation because it is on 1 side completely separated from the rest.

1.3 Domain and Range

The domain is the $x$ values that you can input into your line or curve equation and the range is the possible $y$ values that you can get.

For example, I can input (domain) any $x$ value into the line equation $y = 2x$ and I will be able to get (range) any real number for $y$. Hence, the domain and range for this line equation is all the real numbers (which has the symbol $ℝ$).

Defined and undefined

You say that a function $f(x)$ is defined at a specific $x$ value if $f(x)$ gives you a real value when you input that $x$ into the equation. For example, $f(x)=\frac{2}{3-x}$ is defined at $x=1$ because if I input $x=1$ into $f(x)$ I get: $f(1)=\frac{2}{3-1}=\frac{2}{2}=2$, and $2$ is a real number.

If you input a specific value of $x$ and don't get a real number, the equation or line is said to be undefined at that point (in the sense that it won't give you a real number).

For example: $y=\frac{1}{x}$ is undefined when $x = 0$, since you can't divide by $0$.

Click to Load Limits MCQs