Mr Jarven

    Math

    What Is a Function in Math? Simple Explanation with Examples

    March 16, 2026·8 min read

    What Is a Function?

    A function is a mathematical rule that assigns exactly one output to each input. Think of it like a machine: you put something in, and you always get one specific thing out.

    Simple example:

    • Input: 3
    • Rule: multiply by 2
    • Output: 6

    This function can be written as: f(x) = 2x

    The key idea: each input has exactly one output. If one input could give you two different outputs, it's not a function.

    Function Notation

    Mathematicians use a special notation to write functions:

    f(x) = x + 5

    This means:

    • f is the name of the function
    • x is the input (also called the independent variable)
    • x + 5 is the rule that determines the output

    To evaluate the function at a specific value, replace x with that number:

    • f(2) = 2 + 5 = 7
    • f(10) = 10 + 5 = 15
    • f(-3) = -3 + 5 = 2

    Functions can use any letter as a name — g(x), h(x), or even p(t) for functions of time.

    Domain and Range

    Every function has a domain and a range:

    | Term | Definition | Example for f(x) = x² | |------|-----------|----------------------| | Domain | All possible input values (x values) | All real numbers | | Range | All possible output values (y values) | y ≥ 0 (only zero or positive) |

    Why does it matter? Some functions have restrictions. For example:

    • f(x) = 1/x → you can't divide by zero, so x ≠ 0
    • f(x) = √x → you can't take the square root of a negative number, so x ≥ 0

    Types of Functions

    Here are the most common types of functions you'll encounter in school:

    Linear Functions — f(x) = mx + b

    These create straight lines on a graph. The slope-intercept form is the most common way to write them. Example: f(x) = 3x + 1

    Quadratic Functions — f(x) = ax² + bx + c

    These create U-shaped curves called parabolas. You can solve them using the quadratic formula. Example: f(x) = x² - 4x + 3

    Exponential Functions — f(x) = a · bˣ

    These grow (or decay) rapidly. Example: f(x) = 2ˣ (doubles each step)

    Constant Functions — f(x) = c

    These always give the same output no matter the input. Example: f(x) = 7

    How to Identify a Function

    Not every relationship is a function. Use these tests:

    The Vertical Line Test (for graphs):

    Draw a vertical line anywhere on the graph. If it crosses the curve at more than one point, it's NOT a function.

    • A parabola (y = x²) passes the test ✓
    • A circle (x² + y² = 1) fails the test ✗

    From a table or set of pairs:

    Check if any input (x value) appears more than once with different outputs.

    | x | y | Function? | |---|---|-----------| | 1 | 5 | | | 2 | 8 | | | 3 | 11 | ✓ Yes — each x has one y |

    | x | y | Function? | |---|---|-----------| | 1 | 5 | | | 1 | 7 | | | 2 | 8 | ✗ No — x=1 gives two outputs |

    Real-World Examples of Functions

    Functions aren't just abstract math — they describe real-world relationships:

    • Temperature conversion: F(C) = (9/5)C + 32 — converts Celsius to Fahrenheit
    • Distance traveled: d(t) = 60t — a car traveling at 60 km/h, distance depends on time
    • Cost calculation: C(n) = 5n + 10 — buying n items at $5 each with a $10 shipping fee

    Each of these follows the rule: one input → one output.

    Practice Functions with Mr Jarven

    Functions are a foundation of algebra and appear in almost every math class. If you need help understanding notation, finding domain and range, or graphing — Mr Jarven AI Tutor explains it step by step.

    You can:

    • Ask questions like "What is f(x) = 3x - 2 when x = 4?"
    • Get visual explanations of graphs
    • Generate practice quizzes on functions
    • Build on your knowledge of derivatives and slope-intercept form

    Need help with functions? Ask Mr Jarven AI Tutor →

    Get a step-by-step explanation.

    Mr Jarven explains math and any topic at your level — with practice questions and instant feedback.

    Ask Mr Jarven