Objective

In the following sections, we’ll review variables and discuss functions. A function rule is an equation that describes a function; we’ll get some practice with this concept and then move on to linear functions.

You are watching: Can y values repeat in a function

Previously Covered:We covered how ratios work and looked at some ways that you could apply them.We also reviewed proportions and saw how to use cross multiplication to compare triangles, scale modes, and maps.

### What’s a Function?

Before getting into functions, there are a few other things we need to make sure that you understand first.

We’ll begin with the concept of independent and dependent variables. In the graph above, the independent variable is the number of hours worked. The change in the number of hours affects the amount paid. The independent variable is almost always on the x-axis and is represented by x in equations.

The dependent variable is the amount paid. The amount paid depends on the hours worked. The dependent variable is almost always on the y-axis and is represented by y in equations.

The information in the graph can be represented in a table, showing the values of x and y. The information can also be shown as ordered pairs (x, y).

A relation is any set of ordered pairs.

A function is a special kind of relation. Functions assign exactly one value of the dependent variable to each value of the independent variable. Let’s assume that x is the independent variable and y is the dependent variable. To put it concisely:

In a function, there can only be one x-value for each y-value. There can be duplicate y-values but not duplicate x-values in a function.

When there is one and only one y-value for each x-value (no duplicates in y), it is called a one-to-one function.

You can determine if a relation is a function by looking at a table of values.

Examples You can also determine if a relation is a function from its graph using the vertical-line test. The vertical line test can be done with any straight object, like a pencil. Pass the pencil vertically across the graph, and if it crosses the line of the relation more than once, it is not a function. (By the way, a one-to-one function also passes the horizontal-line test.) Question

All of the followings are functions except: The correct answer is C. Choice C is not a function because there are repeated x-values in the table. Choice D is not a one-to-one function, but it is still a function.

### Function Rules

A function rule is an equation that describes a function. A typical function rule looks something like this: Plug in values for x to get values for y. Sometimes a domain, in set brackets, is given and you are expected to find the range.

Example

Given the domain 0, 2, 4 and the function rule y = 3x + 2, find the range.

y = 3(0) + 2 = 2

y = 3(2) + 2 = 8

y = 3(4) + 2 = 14

The range for the function rule y = 3x + 2 is 2, 8, 14.

Sometimes the equation is written with function notation, f(x), instead of y. It means the same thing, but shows what input value was used to find the output. To read f(x), say f of x. The previous function rule would look like this: f(x) = 3x + 2.

Real-life situations can sometimes be modeled with functions. Situations where the independent and dependent variables increase or decrease together and situations where one increases while the other decreases are often functions.

ExamplesMinutes elapsed in a basketball game vs. total points scoredTime a candle has been burning vs. height of candleCost of dinner vs. amount of tip at 15%Question

Given the domain 0, -2, -4 and the function rule f(x) = x2 + 1, find the range.

0, -2, -40, 4, 161, -5, -171, 5, 17

The correct answer is D. When a negative number is squared, the answer is positive. Then one is added to each.

### Inverse Functions

In an inverse function, the x-values (domain) and y-values (range) are switched. The function must be a one-to-one function in order to have an inverse function. The range becomes the domain when the function is inverted and, as you know, the domain can not have duplicate values.

Example Question

Which set of ordered pairs represents the inverse of the function shown? (-4, 6); (-1, 3); (0, 2)(6, -4); (3, -1); (2, 0)(4, 6); (3, 1); (2, 0)(6, -4); (-1, 3); (0, 2)

The correct answer is B. Choice A shows three ordered pairs in the given function. Switch the x-values with the y-values to get the inverse function.

### How is a Linear Function Different from Other Functions

A linear function produces, not surprisingly, the graph of a straight line. Some functions produce curves, others make zigzag lines, and still others make v-shapes. Linear functions are one-to-one functions.

In a linear-function rule, the highest power of x is one. No higher powers of x can be used if a function is linear. (Think about what happens when negative numbers are squared and you will begin to understand our next chapter, quadratic functions.)

Linear Functions vs. Nonlinear Functions

 f(x) = x + 8 f(x) = x2 – 1 f(x) = 4x – 9 f(x) = x2 + 4x + 4 f(x) = -1/2 x + 2 f(x) = x3 + 1

Horizontal lines are also linear functions, although they do not have an x-value. A horizontal line comes from any equation like y = 3 or y = 6. The line crosses the y-axis at the number given and is horizontal; for any value of x, the y-value is always the same.

Graphing linear equations is quick and easy. If you are unsure how to graph them, see the sections below to learn more.

Graphing Linear Equations from a Table

If you are given a table of values for x and y, the values are ready to be used as ordered pairs (x, y). Remember the x-value tells you the horizontal movement on the graph, and the y-value tells you the vertical movement on the graph.

If you have to draw your own coordinate plane, be sure to include enough grid spaces to be able to graph all of the points. Sometimes it is easier to count by twos or fives, depending on the information given in the table. Count using the same interval the whole time.

Once you have marked all the points on the graph, use a ruler to connect the dots.

Example

Graph the function shown in the table. Graphing Linear Equations from a Rule

If you are given a function rule, it is your job to create the table of x and y values. Then graph the f(x) and x values as ordered pairs just as you would if you were given a table of values.

Choose at least three values because, if you make a calculation error, you can easily see that your three points don’t make a straight line. Two points always make a straight line, so mistakes are harder to see.

Choose numbers that are easy to work with in the equation. Avoid fractional answers for y whenever possible. Zero is always a good choice for x; It is also a good idea to choose at least one negative number as part of the input.

Example

Graph the function  ### Constant Rate of Change

Linear functions have a constant rate of change; that is why they make a single straight line when graphed. The reverse is also true: if a table of values or a graph shows a constant rate of change, then the function it represents is linear.

Rate of change is also known as slope.

Rate of change is the change in y divided by the change in x. Algebraically, you can use the delta symbol (Δ) to represent change, so that it looks like: How can you tell if a function has a constant rate of change? Check the following table:

From a Graph From a Table

 A function has a constant rate of change if, for each amount traveled across, you travel the same amount up (or down) to reach the line again. It looks like stair steps if you draw them on the graph. In a table, there is a constant rate of change if the ratio of the difference between entries on the x-side and y-side stays the same. This is easier to show with tables than to write, so let’s take a look at some examples.  ### Linear-Function Rule

Linear-function rules, which are also called linear equations, can be written from looking at the x and y values given in a table. Writing function rules is really the same process as figuring out the rule for any pattern.

For example, in a pattern written like this: 3, 7, 11, 15, 19, …, you figure out by trial and error that it seems to work if you add four to get to the next number.

With linear functions, the rule could be slightly more complicated than x + 4 (although not always!), but if you know the table is showing a linear function, then you also know that x can’t be raised to any power except one. (You just learned how to determine if the function is linear by looking at constant rate of change; sometimes the problem will just state for you that the function is linear.)

The rate of change comes in handy another way. The rate of change is the number by which x is multiplied in the function rule. Then figure out what to add or subtract to get to the number in the y-value column. It should be the same number each time as you move through the table.

You can try the guess-and-check method first; you can often come up with the rule fairly easily on your own, especially if x is not multiplied by a fraction.

Let’s take a look at a few examples. Write the function rule for each linear function. Question

Which linear-function rule correctly represents the data in the table below?

 x y -2 -7 0 -1 1 2 4 11
y = x – 1y = 2x + 3y = 4x – 2y = 3x – 1