Function Examples in Mathematics- From Basic to Advanced

What Functions Actually Are (And Why You Need to Know Them)

A function is a relationship where each input gives exactly one output. That's it. No ambiguity, no exceptions. If you put in a number and get two different results, it's not a function.

Mathematicians write it like this: f(x) = y. You read it as "f of x equals y." The domain is your set of inputs. The range is your set of outputs. Most students trip up here by confusing these two.

Basic Function Examples You Already Know

Linear Functions

Linear functions produce straight lines when graphed. The formula is f(x) = mx + b.

Example: f(x) = 3x + 5

Linear functions show up constantly in real life. Tax calculations, distance over time at constant speed, unit pricing. If something changes at a steady rate, you're looking at a linear function.

Quadratic Functions

Quadratic functions create parabolas. The standard form is f(x) = ax² + bx + c.

Example: f(x) = x² - 4x + 3

These functions are everywhere. Projectile motion follows a quadratic pattern. The area of shapes often involves quadratic relationships. The graph opens upward if a is positive, downward if a is negative.

Constant Functions

The simplest function: f(x) = c, where c is any number. No matter what you input, you always get the same output. The graph is a horizontal line.

Intermediate Function Types Worth Knowing

Polynomial Functions

Polynomials are functions with variables raised to whole number powers and added together. Linear and quadratic are specific types of polynomials.

General form: f(x) = aₙxⁿ + aₙ₋₁xⁿ⁻¹ + ... + a₁x + a₀

The degree of the polynomial tells you the highest power. Degree 1 is linear. Degree 2 is quadratic. Degree 3 is cubic, and so on.

Exponential Functions

Exponential functions have the form f(x) = aˣ where a is a constant base.

Example: f(x) = 2ˣ

Growth and decay problems use exponential functions. Population growth, radioactive decay, compound interest. These grow incredibly fast, which is why exponential functions terrify epidemiologists during outbreaks.

Logarithmic Functions

Logarithms are the inverse of exponentials. f(x) = logₐ(x) answers the question: "What exponent gives us x?"

Example: log₂(8) = 3 because 2³ = 8

Logarithmic scales measure things like earthquake magnitude (Richter scale), sound intensity (decibels), and acidity (pH). They're useful when you're dealing with values that span huge ranges.

Rational Functions

Rational functions are ratios of polynomials: f(x) = p(x)/q(x) where q(x) ≠ 0.

Example: f(x) = 1/x

These functions have asymptotes—lines the graph approaches but never touches. They're common in rate problems and optimization scenarios.

Advanced Function Examples

Trigonometric Functions

sin(x), cos(x), and tan(x) relate angles to side ratios in right triangles. They also describe waves, cycles, and periodic phenomena.

Trigonometric functions model alternating current, sound waves, light waves, seasonal patterns, and anything that repeats on a predictable cycle.

Piecewise Functions

Piecewise functions use different formulas for different input ranges.

f(x) = { x² if x < 0, 2x if x ≥ 0 }

The absolute value function is a classic piecewise function:

|x| = { x if x ≥ 0, -x if x < 0 }

Real-world applications include tax brackets, shipping cost calculations, and any situation where rules change at specific thresholds.

Composite Functions

Composite functions apply one function to the result of another: (f ∘ g)(x) = f(g(x))

Example: If f(x) = x + 2 and g(x) = 3x, then (f ∘ g)(x) = 3x + 2

You read these inside-out. First you calculate g(x), then you feed that result into f. This matters when modeling multi-step processes where each step transforms the previous result.

Inverse Functions

An inverse function f⁻¹(x) reverses whatever f(x) does. If f(x) = 3x + 1, then f⁻¹(x) = (x - 1)/3.

To find an inverse: swap x and y, then solve for y. The original function must pass the horizontal line test—each output comes from exactly one input—for the inverse to also be a function.

Function Types Comparison

Function Type General Form Graph Shape Key Characteristic
Linear f(x) = mx + b Straight line Constant rate of change
Quadratic f(x) = ax² + bx + c Parabola Single vertex point
Exponential f(x) = aˣ J-shaped curve Rapid growth or decay
Logarithmic f(x) = logₐ(x) Slow-rising curve Inverse of exponential
Polynomial f(x) = Σaᵢxⁱ Varies by degree Multiple turning points possible
Trigonometric f(x) = sin(x), cos(x) Wave pattern Repeats periodically
Rational f(x) = p(x)/q(x) Hyperbola or curves Has asymptotes

How to Evaluate Any Function (Step-by-Step)

Evaluating functions is mechanical once you understand the process. Here's how to handle any function evaluation:

Step 1: Identify the Input Value

Look for what's in the parentheses. If you see f(3), your input is 3. If you see f(x + 1), your input is (x + 1).

Step 2: Substitute the Input

Replace every instance of the variable with your input. For f(x) = 2x² - 3x + 1, finding f(4) means writing: 2(4)² - 3(4) + 1

Step 3: Apply Order of Operations

Calculate exponents first, then multiplication, then addition/subtraction. For our example: 2(16) - 12 + 1 = 32 - 12 + 1 = 21

Step 4: Check for Domain Restrictions

Does your function have any values that can't be inputs? Fractions mean denominators can't be zero. Even roots mean radicands can't be negative. Logarithms mean arguments must be positive. Square root of negative numbers fails in real number arithmetic.

Common Mistakes That Wreck Function Problems

Where Functions Appear in Real Applications

Physics uses functions constantly. Position as a function of time in kinematics. Force as a function of distance in gravitational calculations. Voltage as a function of current in electrical circuits.

Economics relies on functions for supply and demand curves, cost functions, and profit maximization. Business uses revenue functions, break-even analysis, and depreciation models.

Computer graphics render curves using parametric functions. Video game physics engines run on function calculations. Machine learning models are essentially extremely complex nested functions processing inputs into predictions.

Quick Reference: Function Notation Cheat Sheet

Functions are the backbone of mathematics. Once you grasp inputs, outputs, and how different function types behave, calculus, differential equations, and higher mathematics become accessible. The mechanics are straightforward—substitute, simplify, check your work. No mystery to it.