Introduction to Functions

Function notation, domain, range, and evaluation

Introduction to Functions

What is a Function?

A function is a special relationship between inputs and outputs where each input has exactly ONE output.

Think of a function as a machine:

  • You put in an input (x)
  • The machine processes it
  • You get exactly one output (y)

Real-life examples:

  • Vending machine: insert money (input) โ†’ get item (output)
  • Temperature conversion: Fahrenheit (input) โ†’ Celsius (output)
  • Square function: number (input) โ†’ its square (output)

Function Notation

Instead of writing y = 2x + 3, we can write:

f(x) = 2x + 3

Read as: "f of x equals 2x plus 3"

Parts:

  • f is the name of the function (can be any letter)
  • x is the input variable (independent variable)
  • f(x) is the output value (dependent variable)
  • f(x) replaces y

Other function names:

  • g(x), h(x), F(x), etc.

Evaluating Functions

Evaluating a function means finding the output for a specific input.

Example 1: If f(x) = 3x + 5, find f(2)

Substitute x = 2: f(2) = 3(2) + 5 f(2) = 6 + 5 f(2) = 11

This means when x = 2, the output is 11.

Example 2: If g(x) = xยฒ - 4, find g(-3)

g(-3) = (-3)ยฒ - 4 g(-3) = 9 - 4 g(-3) = 5

Example 3: If h(x) = 2xยฒ + x - 1, find h(0)

h(0) = 2(0)ยฒ + 0 - 1 h(0) = -1

Example 4: If f(x) = xยฒ + 3x, find f(a)

f(a) = aยฒ + 3a

We just replace x with a!

Evaluating with Expressions

Example 1: If f(x) = xยฒ + 1, find f(x + 2)

Substitute (x + 2) for every x: f(x + 2) = (x + 2)ยฒ + 1 f(x + 2) = xยฒ + 4x + 4 + 1 f(x + 2) = xยฒ + 4x + 5

Example 2: If g(x) = 2x - 3, find g(3a)

g(3a) = 2(3a) - 3 g(3a) = 6a - 3

Example 3: If h(x) = xยฒ, find h(x + h)

h(x + h) = (x + h)ยฒ h(x + h) = xยฒ + 2xh + hยฒ

Function vs. Not a Function

The Vertical Line Test: A graph represents a function if NO vertical line crosses it more than once.

Example: Functions

  • y = 2x + 1 (linear) โœ“
  • y = xยฒ (parabola) โœ“
  • y = |x| (absolute value) โœ“

Example: Not Functions

  • xยฒ + yยฒ = 1 (circle) โœ—
  • x = yยฒ (sideways parabola) โœ—

These fail because one x-value gives multiple y-values.

Functions from Tables

A table represents a function if each input appears only ONCE.

Function: โœ“ | x | y | |---|---| | 1 | 3 | | 2 | 5 | | 3 | 7 |

Each x has exactly one y.

Not a function: โœ— | x | y | |---|---| | 1 | 3 | | 1 | 5 | | 2 | 7 |

x = 1 has two different outputs!

Functions from Ordered Pairs

A set of ordered pairs is a function if no two pairs have the same first element with different second elements.

Function: {(1, 2), (2, 4), (3, 6)} โœ“

Not a function: {(1, 2), (1, 3), (2, 5)} โœ— Because (1, 2) and (1, 3) have same input, different outputs.

Functions from Mappings

A mapping diagram shows inputs pointing to outputs.

Function: Each input has exactly ONE arrow going out.

Not a function: If any input has MULTIPLE arrows going to different outputs.

Independent and Dependent Variables

Independent variable (input):

  • The variable you choose freely
  • Usually x
  • Plotted on horizontal axis

Dependent variable (output):

  • The variable that depends on input
  • Usually y or f(x)
  • Plotted on vertical axis

Example: In f(x) = 2x + 3

  • x is independent (you choose x)
  • f(x) is dependent (value depends on what x you chose)

Types of Functions

Linear Function: f(x) = mx + b Graph is a straight line Example: f(x) = 2x + 3

Quadratic Function: f(x) = axยฒ + bx + c Graph is a parabola Example: f(x) = xยฒ - 4

Absolute Value Function: f(x) = |x| Graph is V-shaped Example: f(x) = |x - 2|

Constant Function: f(x) = c (always same output) Graph is horizontal line Example: f(x) = 5

Identity Function: f(x) = x (output equals input) Graph is line through origin with slope 1

Finding Inputs from Outputs

Sometimes we know f(x) and need to find x.

Example 1: If f(x) = 3x - 2 and f(x) = 7, find x

Set up equation: 3x - 2 = 7 3x = 9 x = 3

So f(3) = 7

Example 2: If g(x) = xยฒ and g(x) = 16, find x

xยฒ = 16 x = ยฑ4

Both x = 4 and x = -4 give output 16.

Example 3: If h(x) = 2x + 1 and h(x) = -3, find x

2x + 1 = -3 2x = -4 x = -2

Domain and Range (Introduction)

Domain: The set of all possible INPUT values (x-values)

Range: The set of all possible OUTPUT values (y-values or f(x)-values)

Example 1: f(x) = x + 5 Domain: all real numbers Range: all real numbers

Example 2: g(x) = xยฒ Domain: all real numbers Range: y โ‰ฅ 0 (squares are never negative)

Example 3: h(x) = 1/x Domain: all real numbers except 0 (can't divide by 0) Range: all real numbers except 0

Real-World Function Examples

Example 1: Temperature Conversion C(F) = (5/9)(F - 32)

Input: Fahrenheit temperature Output: Celsius temperature

C(32) = (5/9)(32 - 32) = 0ยฐC C(212) = (5/9)(212 - 32) = 100ยฐC

Example 2: Cost Function C(n) = 50 + 10n

Input: number of items (n) Output: total cost in dollars

C(5) = 50 + 10(5) = 100Thismeans5itemscost100 This means 5 items cost 100.

Example 3: Distance d(t) = 60t

Input: time in hours Output: distance in miles (at 60 mph)

d(3) = 60(3) = 180 miles After 3 hours, you've traveled 180 miles.

Function Composition (Preview)

Composition means putting one function inside another.

Notation: (f โˆ˜ g)(x) = f(g(x))

Read as: "f of g of x"

Example: If f(x) = x + 1 and g(x) = 2x

f(g(x)) = f(2x) = 2x + 1

First apply g, then apply f to the result.

Why Functions Matter

Functions are everywhere in mathematics and real life:

  • Physics: distance, velocity, acceleration
  • Economics: cost, revenue, profit
  • Biology: population growth
  • Engineering: stress, strain, load
  • Computer Science: algorithms, programs
  • Everyday: recipes, directions, conversions

Understanding functions is key to advanced mathematics!

Common Mistakes to Avoid

  1. Confusing f(x) with f ยท x f(x) is NOT f times x, it's function notation

  2. Adding instead of substituting f(2) means replace x with 2, not add 2

  3. Not using parentheses If f(x) = xยฒ, then f(2x) = (2x)ยฒ = 4xยฒ, not 2xยฒ

  4. Thinking every relation is a function Remember: each input needs exactly ONE output

  5. Mixing up domain and range Domain = inputs (x), Range = outputs (y)

Checking if an Equation Represents a Function

Method 1: Solve for y If you can solve for y and get only one y for each x, it's a function.

Example: x + y = 5 Solve: y = 5 - x โœ“ Function (one y for each x)

Example: xยฒ + yยฒ = 25 Solve: y = ยฑโˆš(25 - xยฒ) โœ— Not a function (two y-values)

Method 2: Graph and use vertical line test

Method 3: Make a table and check for repeated inputs

Function Notation Advantages

Why use f(x) instead of y?

  1. Names multiple functions clearly f(x), g(x), h(x) vs. yโ‚, yโ‚‚, yโ‚ƒ

  2. Shows input explicitly f(3) clearly means input is 3

  3. Easier composition f(g(x)) is clearer than nested y's

  4. Better for applications C(n), d(t), P(x) tell you what the variables mean

Practice Problems Approach

When evaluating f(a):

  1. Write out the function
  2. Replace every x with a (use parentheses!)
  3. Simplify following order of operations
  4. Write final answer

When finding x given f(x):

  1. Set f(x) equal to given value
  2. Solve the equation for x
  3. Check your answer by substituting back

Quick Reference

Function Definition: Each input has exactly ONE output

Notation: f(x) = expression

Evaluation: f(a) means substitute a for x

Vertical Line Test: Function if no vertical line crosses graph twice

Domain: All possible inputs

Range: All possible outputs

Practice Strategy

Level 1: Simple evaluation

  • f(x) = x + 3, find f(5)
  • g(x) = 2x, find g(7)

Level 2: Quadratic functions

  • f(x) = xยฒ, find f(-3)
  • h(x) = xยฒ + 2x, find h(4)

Level 3: Expressions as inputs

  • f(x) = x + 1, find f(2x)
  • g(x) = xยฒ, find g(x + 1)

Level 4: Working backwards

  • f(x) = 3x - 2, f(x) = 10, find x

Level 5: Applications

  • Real-world function problems

Tips for Success

  • Always use parentheses when substituting
  • Follow order of operations carefully
  • Check if relations are functions before evaluating
  • Remember f(x) is just another way to write y
  • Practice with different function names (f, g, h)
  • Understand the input-output relationship
  • Use the vertical line test on graphs
  • Master evaluation before moving to composition

๐Ÿ“š Practice Problems

1Problem 1easy

โ“ Question:

If f(x) = 3x + 2, find f(5)

๐Ÿ’ก Show Solution

Step 1: Understand what f(5) means: It means substitute x = 5 into the function

Step 2: Replace x with 5 in the function: f(5) = 3(5) + 2

Step 3: Calculate: f(5) = 15 + 2 f(5) = 17

Answer: f(5) = 17

2Problem 2easy

โ“ Question:

If f(x)=2xโˆ’5f(x) = 2x - 5, find f(3)f(3)

๐Ÿ’ก Show Solution

To find f(3)f(3), substitute x=3x = 3 into the function:

f(x)=2xโˆ’5f(x) = 2x - 5 f(3)=2(3)โˆ’5f(3) = 2(3) - 5 f(3)=6โˆ’5f(3) = 6 - 5 f(3)=1f(3) = 1

Answer: f(3)=1f(3) = 1

3Problem 3easy

โ“ Question:

Is this relation a function? {(1, 3), (2, 5), (3, 7), (4, 5)}

๐Ÿ’ก Show Solution

Step 1: Recall the definition of a function: A function is a relation where each input (x-value) has exactly ONE output (y-value).

Step 2: Check each x-value: x = 1 โ†’ y = 3 x = 2 โ†’ y = 5 x = 3 โ†’ y = 7 x = 4 โ†’ y = 5

Step 3: Determine if any x-value repeats: All x-values (1, 2, 3, 4) are different. Each x-value maps to only one y-value.

Note: It's okay for different x-values to have the same y-value (both 2 and 4 give 5).

Answer: Yes, this is a function

4Problem 4medium

โ“ Question:

Given g(x)=x2โˆ’3x+1g(x) = x^2 - 3x + 1, find g(โˆ’2)g(-2)

๐Ÿ’ก Show Solution

Substitute x=โˆ’2x = -2 into the function:

g(x)=x2โˆ’3x+1g(x) = x^2 - 3x + 1 g(โˆ’2)=(โˆ’2)2โˆ’3(โˆ’2)+1g(-2) = (-2)^2 - 3(-2) + 1 g(โˆ’2)=4+6+1g(-2) = 4 + 6 + 1 g(โˆ’2)=11g(-2) = 11

Answer: g(โˆ’2)=11g(-2) = 11

5Problem 5medium

โ“ Question:

If g(x) = xยฒ - 4x + 1, find g(-2)

๐Ÿ’ก Show Solution

Step 1: Substitute x = -2 into the function: g(-2) = (-2)ยฒ - 4(-2) + 1

Step 2: Calculate the squared term: (-2)ยฒ = 4

Step 3: Calculate the linear term: -4(-2) = 8

Step 4: Add all terms: g(-2) = 4 + 8 + 1 g(-2) = 13

Answer: g(-2) = 13

6Problem 6medium

โ“ Question:

Is this relation a function? {(2, 3), (4, 5), (2, 7), (6, 9)}

๐Ÿ’ก Show Solution

Step 1: Check each x-value in the ordered pairs: (2, 3) โ†’ x = 2 maps to y = 3 (4, 5) โ†’ x = 4 maps to y = 5 (2, 7) โ†’ x = 2 maps to y = 7 โ† Problem! (6, 9) โ†’ x = 6 maps to y = 9

Step 2: Identify the issue: The x-value 2 appears twice:

  • Once paired with 3
  • Once paired with 7

Step 3: Apply the definition: A function requires each input to have exactly ONE output. Since x = 2 has TWO different outputs (3 and 7), this violates the definition of a function.

Answer: No, this is NOT a function

7Problem 7medium

โ“ Question:

Find the domain of h(x)=1xโˆ’4h(x) = \frac{1}{x - 4}

๐Ÿ’ก Show Solution

The domain is all real numbers except where the denominator equals zero.

Set the denominator equal to zero: xโˆ’4=0x - 4 = 0 x=4x = 4

We cannot divide by zero, so x=4x = 4 must be excluded.

Answer: Domain: all real numbers except x=4x = 4

In interval notation: (โˆ’โˆž,4)โˆช(4,โˆž)(-\infty, 4) \cup (4, \infty)

8Problem 8hard

โ“ Question:

If h(x) = 2x - 5, find the value of x when h(x) = 11

๐Ÿ’ก Show Solution

Step 1: Set up the equation: We want h(x) = 11, so: 2x - 5 = 11

Step 2: Solve for x (add 5 to both sides): 2x = 11 + 5 2x = 16

Step 3: Divide both sides by 2: x = 8

Step 4: Check by finding h(8): h(8) = 2(8) - 5 = 16 - 5 = 11 โœ“

This means when we input x = 8, the output is 11.

Answer: x = 8