No history yet

Functions and Graphs

What is a Function?

Think of a function as a simple machine. You put something in, it does something specific, and one thing comes out. For every unique input, you get exactly one output. Mathematicians call the input an independent variable (usually xx) and the output a dependent variable (usually yy or f(x)f(x)).

For example, in the function f(x)=x+2f(x) = x + 2, if you put in a 3, you'll always get a 5. If you put in a 10, you'll always get a 12. You can't put in a 3 and sometimes get 5 and other times get 9.

Function

noun

A rule that assigns to each element in a set of inputs (the domain) exactly one element in a set of outputs (the range).

This one-to-one or many-to-one relationship is the key. You can have multiple inputs leading to the same output (like how both x=2x=2 and x=2x=-2 give an output of 4 in the function f(x)=x2f(x) = x^2), but you can't have one input leading to multiple outputs.

When we graph functions, we use the vertical line test. If you can draw a vertical line anywhere on the graph and it only ever crosses the function's curve once, it's a valid function. If it hits the curve more than once, it's not.

Domain and Range

Every function has a domain and a range. The domain is the set of all possible inputs the function can accept. The range is the set of all possible outputs the function can produce.

For some functions, the domain is all real numbers. You can plug any number you want into f(x)=2x+1f(x) = 2x + 1 and it will work. But for a function like f(x)=1/xf(x) = 1/x, you can't use 0 as an input because division by zero is undefined. So, its domain is all real numbers except 0.

Lesson image

The range is determined by what the function does. For f(x)=x2f(x) = x^2, the domain is all real numbers. But since squaring any number (positive or negative) results in a positive number or zero, the range is all non-negative numbers. You can never get an output of -5 from this function.

A Tour of Common Functions

Functions come in many flavors. Let's look at some of the most common types you'll encounter.

Linear Functions: These are the simplest. Their formula is f(x)=mx+bf(x) = mx + b and their graph is always a straight line. The value 'mm' represents the slope (how steep the line is), and 'bb' is the y-intercept (where the line crosses the vertical y-axis).

Quadratic Functions: These have the form f(x)=ax2+bx+cf(x) = ax^2 + bx + c. Their graphs are U-shaped curves called parabolas. They can open upwards or downwards depending on whether 'aa' is positive or negative.

Lesson image

Polynomial Functions: These are a generalization of linear and quadratic functions, with the form f(x)=anxn+an1xn1+...+a1x+a0f(x) = a_n x^n + a_{n-1} x^{n-1} + ... + a_1 x + a_0. The highest power, nn, is called the degree of the polynomial. Their graphs are smooth, continuous curves that can have various twists and turns.

Rational Functions: These are ratios of two polynomials, like f(x)=P(x)/Q(x)f(x) = P(x) / Q(x). Their graphs can be more complex and often have asymptotes, which are lines that the curve gets closer and closer to but never touches. The function f(x)=1/xf(x) = 1/x is a simple example.

Exponential and Logarithmic Functions: These two are closely related. An exponential function, f(x)=axf(x) = a^x, models rapid growth or decay. A logarithmic function, f(x)=loga(x)f(x) = \log_a(x), is its inverse. It answers the question: "what exponent do I need to raise 'aa' to in order to get 'xx'?" Their graphs are mirror images of each other across the line y=xy=x.

Lesson image

Transforming and Inverting Functions

Once you know the basic shape of a function's graph, you can move it around without re-plotting everything. These movements are called transformations.

  • Vertical Shift: Adding a constant to the outside of a function moves it up or down. f(x)+cf(x) + c shifts the graph up by cc units.
  • Horizontal Shift: Adding a constant to the inside of a function moves it left or right. f(xc)f(x - c) shifts the graph right by cc units, and f(x+c)f(x + c) shifts it left.
  • Stretching/Compressing: Multiplying the function by a constant, cf(x)c \cdot f(x), stretches it vertically if c>1c > 1 and compresses it if 0<c<10 < c < 1.
  • Reflection: A negative sign also causes a reflection. f(x)-f(x) reflects the graph across the x-axis, while f(x)f(-x) reflects it across the y-axis.
Lesson image

Finally, we have inverse functions. If a function f(x)f(x) takes an input xx to an output yy, its inverse function, denoted f1(x)f^{-1}(x), does the opposite: it takes yy back to xx. For a function to have an inverse, it must be "one-to-one," meaning every output corresponds to exactly one input. It must pass both the vertical and horizontal line tests.

To find the inverse, you can swap the xx and yy variables in the equation and solve for the new yy. For example, the inverse of f(x)=2x+3f(x) = 2x + 3 is found by writing y=2x+3y = 2x + 3, swapping to get x=2y+3x = 2y + 3, and solving for yy to get y=(x3)/2y = (x - 3) / 2. So, f1(x)=(x3)/2f^{-1}(x) = (x-3)/2.

Understanding these core ideas about functions and their graphs is the first major step into the world of calculus. They are the objects we will analyze with more advanced tools later on.

Quiz Questions 1/5

A relation is considered a function if for every unique input, there is exactly one output.

Quiz Questions 2/5

What is the domain of the function f(x)=1x3f(x) = \frac{1}{x-3}?