Functions

A function is a rule that assigns exactly one output to each allowable input. This idea, one output per input, is the cornerstone of all of calculus. Understanding domains, ranges, and how to read a function's graph are prerequisites for every topic that follows.

Concept Description
Domain ( Dom ( f ) ) Set of allowable inputs
Range ( Rng ( f ) ) Set of actual outputs
Co-domain Target set B in f : A B
Graph of f Set of all points ( x , f ( x ) )

Definition of a Function

A function f from a set A to a set B is a rule that assigns, to each element x in A , one and only one element y in B . We write y = f ( x ) .

Sets A and B are called the domain and co-domain of f , respectively. To say that f is a function with domain A and co-domain B , we write f : A B .

  • If y = f ( x ) , we call x the independent variable (the argument or input) and y the dependent variable (the value of f at x , the image of x under f , or the output).
  • In elementary calculus, A and B are assumed to be subsets of unless stated otherwise.

Strictly speaking, f ( x ) is the value of f at x , but we commonly say "the function f ( x ) " or "the function y = f ( x ) ." For example, the function f : that squares its input can be described as:

  1. "the function f ( x ) = x 2 "
  2. "the function y = x 2 " (if we call the dependent variable y )
  3. "the function x 2 "

All three descriptions refer to the same object.

The Graph of a Function

The graph of a function f is the set of all ordered pairs ( x , y ) where x is in the domain of f and y = f ( x ) . In rectangular coordinates, the graph is a curve (or collection of curves) in the plane. It provides a visual picture of how the output of f depends on the input.

Determining the Domain and Range from the Graph

  • To check whether a specific y -value is in the range: draw a horizontal line at that y -value. If it intersects the graph, the value is in the range. The horizontal projection of the graph onto the y -axis is the range.
  • To check whether a specific x -value is in the domain: draw a vertical line at that x -value. If it intersects the graph, the value is in the domain. The vertical projection of the graph onto the x -axis is the domain.
Graph of a function with horizontal and vertical projections illustrating how to read the domain and range

Finding the domain and range of a function using its graph.

The Natural Domain and Range

When the domain of a function is not specified, we assume it to be the set of all real numbers for which f ( x ) is defined and real. This set is the natural domain of f , denoted Dom ( f ) .

The set of all real numbers for which f ( x ) is real is called the natural domain (or simply the domain) of the function.

  • To restrict the domain, you must say so explicitly. For example, " f ( x ) = x 2 , x > 0 " restricts the domain to positive numbers. Without that qualifier, the domain of f ( x ) = x 2 is all of .

The range of f is the set of all possible outputs:

If f : A B , the range of f is

Rng ( f ) = { f ( x ) x A } .

Note that the range is always a subset of the co-domain: Rng ( f ) B .

Natural Domains of Common Functions

  1. Polynomial f ( x ) = a n x n + + a 0 : defined for every real x . Domain: .
  2. f ( x ) = 1 x n ( n > 0 ): defined for all x except x = 0 . Domain: ( , 0 ) ( 0 , + ) .
  3. f ( x ) = x 2 n (even root, n > 0 ): defined for x 0 . Domain: [ 0 , + ) .
  4. f ( x ) = x 2 n + 1 (odd root, n > 0 ): defined for every real x . Domain: .
  5. f ( x ) = ln x : defined only for x > 0 . Domain: ( 0 , + ) .
  6. f ( x ) = a x ( a > 0 constant): defined for every real x and always positive. Domain: .
  7. Rational function f ( x ) = P ( x ) Q ( x ) : domain is all x except where Q ( x ) = 0 .
  8. f ( x ) = sin x or f ( x ) = cos x : defined for every real x . Domain: .
  9. f ( x ) = tan x : defined for all x except x = ( 2 n + 1 ) π 2 ( n any integer), where cos x = 0 .
  10. f ( x ) = arcsin x or f ( x ) = arccos x : defined only for 1 x 1 . Domain: [ 1 , 1 ] .
  11. f ( x ) = arctan x : defined for every real x . Domain: .

Frequently Asked Questions

What is the difference between "the function f " and "the function f ( x ) "? Strictly, f is the function (the rule), and f ( x ) is the value the function assigns to the specific input x . However, in practice, people say "the function f ( x ) = x 2 " to mean both the rule and its formula. The distinction matters when you compose functions or invert them: f 1 is the inverse of f as a rule, not the reciprocal of f ( x ) .

How do I find the natural domain of a function like f ( x ) = x 1 x 2 4 ? You need two conditions to hold simultaneously:
  1. x 1 0 , so x 1 (the radicand must be nonnegative).
  2. x 2 4 0 , so x ± 2 (the denominator cannot be zero).
Combined: x 1 and x 2 . Domain: [ 1 , 2 ) ( 2 , + ) .

Is the range always easy to find? Finding the range can be much harder than finding the domain. For the domain, you just identify what inputs cause problems. For the range, you need to determine what outputs are actually achieved, which often requires solving y = f ( x ) for x in terms of y , or using the graph. In calculus, the Intermediate Value Theorem gives a powerful tool for proving that certain ranges are intervals.