Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y)...

35
Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered Pairs: Ex: (x,y): (-3,4), (3,-1),(4,-1) 2)Mapping Diagram: input -> output: -3->4, 3->-1,4->-1 3)Table of values: 4)Graph: The output goes on the x y -3 4 3 -1 4 -1

Transcript of Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y)...

Page 1: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Relations and FunctionsRelation: A set of pairs of input and output values (input, output) or (x,y)How Can we Represent a Relation? Four Ways:1) Ordered Pairs: Ex: (x,y): (-3,4), (3,-1),(4,-1)2) Mapping Diagram: input -> output: -3->4, 3->-1,4-

>-13) Table of values:

4) Graph: The output goes on the vertical axis.

x y-3 43 -14 -1

Page 2: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Ex: Skydivers undergoing FreefallA skydiver falls freely from a plane at an initial height of 10,000 feet. His heights at various times are measured to be 9744 ft. 4 seconds later, 8976 feet 4 seconds after that, 7696 feet 4 seconds after that, and 5904 feet 4 seconds after that.1) Represent the relationship using

a) A mapping diagramb) A set of ordered pairsc) A Table of valuesd) A graph

2) Based on your studies of Physics, what algebraic equation do you expect the height to follow?

Page 3: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Domain and RangeThe set of inputs in a relation is called the domain.The set of outputs in a relation is called the range.Example: What are the domain and range of the time height relation example?

Page 4: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

FunctionA function is a relation in which there is one and only one output for each input.Look at page 62, Problem 3: Which of these relations are functions?Vertical Line Test: Since the output is plotted on the vertical axis of a graph, no vertical line drawn can intersect the graph more than once for the relation to be a function. Look at page 63, Problem 4. Which relations are functions?Ex: What functions have you seen in Physics? Give the inputs and outputs.

Page 5: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Function Rule and Function Notation

A function rule is an algebraic equation, by which we define what we do to an input (or independent variable) to obtain our output (or dependent variable).Function Notations: y=output, x = input

y= 3x+2f(x) = 3x+2 read as “f of x”f(1) = 3(1)+2 read as “f of 1”.

Page 6: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Direct Variation

• When the output (y) can be expressed in terms of the input (x) in the form: y = kx where k is a constant number, we say “y varies directly” with x.

• k = the “constant of variation”.• If y varies directly with x, does y have a linear

relationship with x?• What is the difference between saying “y varies

directly with x” and “y is linear with x”?

Page 7: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Linear Relationships

• Linear Function: – A function whose graph is a line.– Characterized by a slope and vertical intercept:

y = mx+b m = slope, b = y-intercept.– Forms include:• Slope-Intercept form: y = mx + b• Point-Slope Form: y-y1 = m(x-x1) where (x1, y1) is any

point on the line.• Standard Form: Ax+By+C = 0 where A,B,C, are real

numbers and A and B cannot both be zero.

Page 8: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

How are parallel and perpendicular lines related to each other?

• The slopes of parallel lines are equal. (m1=m2)• The slopes of perpendicular lines are negative

reciprocals of each other. (m1= -1/m2)• (We proved this earlier on).What is the equation of the line parallel to

y=6x-2 that runs through the point (1,-3)?What is the equation of the line perpendicular

to y=-4x+(2/3) that runs through (8,5)?

Page 9: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Standard Form for a Line

• Ax + By = C where A, B, and C are coefficients (constants). A and B cannot both be zero.

• Example: Express y=(3/4)x-5 in standard form. Use integer coefficients.

• Standard Form is useful to quickly graph a line by plotting its x and y intercepts.

Example: Graph: 3x + 5y = 15Get x intercept by letting y = 0Get y intercept by letting x = 0.

Page 10: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Piecewise Functions

• Piecewise functions are functions that behave differently depending on the input.

• Examples: Graph the following functions:f(x) = |x|

f(x) = x2 if x<2 6 if x=2 10 – x if x > 2 and x ≤ 6f(x) = [x] = the greatest integer less than or equal to x.

(Called the “greatest integer function”) (see pages 90-91)

Page 11: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

A Linear Model (see page 84)The office manager of a small office ordered 140 packs of printer paper. Based on average daily use, she knows that the paper will last about 80 days. Write a linear equation that gives the number

of packs of paper left after a certain number of days. Define all variables using “Let”.

Graph the equation. What is the equation in standard form? How many packs of paper will they have after

30 days?

Page 12: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Use of Models• Modeling Data: We may gather data from a

situation and use the data to analyze the situation and predict its future.

• Example: Suppose you open a gas station. It costs money to stay open each hour paying workers and utilities.– Should you stay open 24 hours?– When should you open the gas station and when

should you close to maximize your profits?– How could you predict your income over the years?

Page 13: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Using Linear Models

• In the simplest case, we try to model real world data with a linear relationship.

• First make a scatterplot: Plot your data as ordered pairs with the dependent variable on the vertical axis and the independent variable on the horizontal axis.

• The closer the data looks to forming a line, the stronger the relationship, or correlation.

• The correlation can form a positive pattern (slope) or negative pattern (slope).

Page 14: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Pictorial Examples of Correlation

Page 15: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Types of correlation

• Strong negative correlation• Weak negative correlation• No correlation• Weak positive correlation• Strong positive correlationDraw an example of each.

Page 16: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Creating and Using a Linear ModelEx: “Got it” Problem on page 94

• Given the data table of median home prices:

Make a Scatterplot: Median Price (Y) vs. Year (X) Sketch a trend line Measure and calculate the slope using two points on the

line. (DO NOT USE ANY ORIGINAL DATA POINTS) Create the equation of the line: y=mx+b Use the line to predict prices in desired years.

Year 1940 1950 1960 1970 1980 1990 2000

Price 36700 57900 74400 88700 167300 249800 211500

Page 17: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Using the TI-nspire to create a Linear Model

Page 18: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Families of FunctionsWe split up functions into “families” that share a basic dependence on the independent variable, Examples:• f(x) = x (“parent function”)

g(x) = 4 f(x) = 4x h(x) = f(x) + 4 = x+4

• f(x) = x2 (“parent function”) g(x) = 4 f(x)= 4 x2

h(x) = 4f(x) + 3 = 4 x2 + 3 Other functions within a family are formed by

performing a “transformation” on the parent function.

Page 19: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Types of Transformationf(x) = original function

g(x) = transformed function

1. Translations (k and h are positive constants)• Vertical Shift: g(x) = f(x) ± k• Horizontal Shift: g(x) = f(x + h), left shift g(x) = f(x – h), right shift

Plot each of the following f(x), g(x) pairs on the same graph: f(x) = x; g(x) = x-2; h(x) = x+2 f(x) = x2; g(x) = f(x)+2; h(x)= f(x)-2 f(x) = x2; g(x) = f(x+2); h(x) = f(x-2)

Page 20: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

More Transformations2. Reflection• In the y-axis: g(x) = f(-x)• In the x- axis: g(x) = -f(x) On the same graph, plot:

f(x) = 3x+3, g(x) = f(-x), h(x) = -f(x) On the same graph, plot

f(x) = x2 , g(x) = f(-x), h(x) = -f(x) (Was it difficult to plot g(x))?

Page 21: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

More Transformations

3. Vertical Stretching or Compressing (Also called “Scaling”)

g(x) = a f(x) If a > 1 : We’re stretching If 0< a < 1 : We’re compressing. (What if a < 0?) Plot on the same graph

f(x) = x2, g(x) = ½ f(x), h(x) = 2f(x)

Page 22: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

We can combine transformations of an original function.

• Examples: what series of transformations would turn f(x) into g(x) for:• f(x) = 4x and g(x) = -4x + 2 • f(x) = 4x and g(x) = 2x-3• f(x) = 2x2 and g(x) = 6x2 -1

Page 23: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

How do we apply transformations to absolute value functions?

• Vertical Translation (k>0): y=|x| + k (up), y=|x| - k (down)• Horizontal Translation (h>0): y =|x-h|(right), y=|x+h|(left)• Vertical Stretch: y = a|x| with a>1 Compression: y=a|x| with 0<a<1• Reflection: In the x-axis: y=-|x|, In the y-axis: y=|-x|

Page 24: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

General Form of the Absolute Value Function

We can combine the equations for stretches, compressions and translations to write a general form for absolute value equations:• y = a|x-h|= k has vertex at (h,k) and axis of

symmetry x=h. It is stretched or compressed by the factor |a|.

• y = a |-x-h| + k has vertex at (-h,k) because it is reflected in the y-axis with axis of symmetry: x=-h.

Page 25: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

For the following, find the vertex and axis of symmetry and the

transformations from |x|:

• y=3|x-2|+4

• y = -1/3|x+1|+4

• y = 2 |x+4|-3

• y = |-x-3|+9

Page 26: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

How can we form an absolute value equation by looking at its graph?

Follow these steps:1) Identify the vertex: (h,k)2) Identify the a = slope of right branch (that is, if

graph is “upside-down” then a is negative due to reflection in x-axis.)

3) Form the equation: y = a|x-h|+kTry “Got it? Problem 5 on page 110 and problems 29 and 30 on page 111.

Page 27: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Graphing Two Variable Inequalities

When we say: y = mx + bWe’re talking about a set of points that make up a line. If we say: y > mx + b or y < mx + b , we’re talking about a set of points that make up a region (“half-plane”) on one side or the other of a line, but not including the line.And if we say: y≥ mx + b or y ≤ mx + b, the line is included in the region.The line forms the boundary between the > (above the line half-plane) and the < (below the line half-plane).

Page 28: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Some Examples

Try this:• y > 3x – 1

First: Graph the line y = 3x -1; Use a dashed line if the line isn’t included, solid if it is included.

Second: To be safe, test a point in one of the half-planes separated by the line. If it satisfies the inequality condition, shade it in as your solution. Otherwise shade in the other half-plane.

Now try: y ≤ -2x +1

Page 29: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

A Clean Day at the FairAt a county fair, you can buy tickets and redeem them for rides. A small ride requires 3 tickets and a large ride requires 5 tickets. You are constrained to spend $15 at most with which you can buy 60 tickets. What are the small ride/large ride combinations you can buy?Let y = the number of large ridesLet x = the number of small rides. Form an appropriate inequality Graph the linear equation (Hint: use standard form) Only present practical (discrete, non-negative) solutions. How would you change the set of solutions if you added the

constraint that you always throw up during your sixth large ride?

Page 30: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Graphing Absolute Value InequalitiesExample: 1-y < |x+2| Get y alone on left hand side of inequality. This

may result in a change from < to > or vice versa.

Graph the corresponding equality. Shade the region above the graph if > or the

region below the graph if <. As before, the graph is dashed if > or < and

solid if ≥ or ≤.

Page 31: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.

Try These

Graph : y-4 ≥ -|x-1|

Page 117: problem 4 and “Got it” 4.

Page 32: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.
Page 33: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.
Page 34: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.
Page 35: Relations and Functions Relation: A set of pairs of input and output values (input, output) or (x,y) How Can we Represent a Relation? Four Ways: 1)Ordered.