AceAcademy
  • All
  • Knowledge Base
  • Learn Math
  • Learn Chinese
  • learn English
← Back
8 mins read

What Is a Function in Algebra? 25 Easy Examples for Beginners

Learn Math

Your child knows how to multiply 3 by 4. But when a math worksheet suddenly asks them to find f(3), even familiar arithmetic can feel confusing.

So, what is a function in algebra? Simply put, a function is a rule that gives exactly one output for every allowed input. If the rule says “double the number,” putting in 3 gives 6. Putting in 5 gives 10. The rule stays the same, even when the numbers change.

Functions are an important part of pre-algebra and Algebra 1. They help children understand patterns, solve equations, read graphs, and recognize how numbers relate to everyday situations.

Below are 25 easy function examples, starting with basic arithmetic and building toward the skills students need for algebra.

What Is a Function in Algebra? Understanding the Basics

Picture a machine with a slot for numbers. You put one number in, the machine follows a rule, and another number comes out.

Suppose the machine multiplies every input by 3.

  • Input: 2 → Output: 6

  • Input: 4 → Output: 12

  • Input: 7 → Output: 21

In algebra, we describe this rule as:

f(x) = 3x

The letter x stands for the input. The expression f(x) represents the output.

When x = 4, we write f(4) = 12.

What makes a relationship a function?

A function must give exactly one output for each input.

An input of 4 cannot produce both 12 and 15 under the same function rule.

However, different inputs are allowed to have the same output. For example, in the rule f(x) = x², both 3 and −3 produce 9.

It's a small distinction, but it matters later when students begin working with graphs and equations.

25 Easy Examples of Functions in Algebra

You don't need to tackle all 25 in one sitting. Younger students can begin with the first five and work forward. Students already taking pre-algebra may prefer the input-output tables and practice problems.

Examples 1–5: Simple Functions Using Basic Arithmetic

These functions introduce algebra without asking children to learn complicated new operations.

1. Adding 2

Function: f(x) = x + 2

If x = 5, then f(5) = 7.

The function adds two to any input. Try putting in 10. The output becomes 12.

2. Subtracting 3

Function: f(x) = x − 3

If x = 8, then f(8) = 5.

Now reverse the question: what input would produce an output of 10?

The answer is 13.

3. Doubling a Number

Function: f(x) = 2x

If x = 6, the output is 12.

Here's where a little algebra notation becomes useful. The expression 2x means 2 multiplied by x. It does not mean the two-digit number 2x.

4. Multiplying by 5

Function: f(x) = 5x

If x = 4, then f(4) = 20.

This rule follows the five-times table. Children who know their multiplication facts already understand the operation behind it.

5. Dividing by 2

Function: f(x) = x/2

If x = 18, the output is 9.

What if the input is 7? The output is 3.5.

That introduces a useful lesson: a function doesn't always give a whole-number answer.

Examples 6–10: Input-Output Functions in Pre-Algebra

Pre-algebra takes familiar operations and combines them into rules with multiple steps.

6. Add 1, Then Multiply by 3

Function: f(x) = 3(x + 1)

For x = 2:

3(2 + 1) = 9

The parentheses tell us to add before multiplying.

7. Multiply by 4, Then Subtract 2

Function: f(x) = 4x − 2

For x = 3:

4(3) − 2 = 10

Ask your child to explain why the answer isn't 4. The goal is to understand the order of operations, not just calculate quickly.

8. Squaring a Number

Function: f(x) = x²

If x = 4, the output is 16.

Try x = −4. The output is also 16.

Same output, different inputs. Still a function.

9. Squaring a Number and Adding 1

Function: f(x) = x² + 1

If x = 3:

3² + 1 = 10

What happens at x = 0?

The answer is 1. This often catches children who assume a zero input must produce a zero output.

10. Finding Absolute Value

Function: f(x) = |x|

If x = −7, the output is 7.

Absolute value describes distance from zero, regardless of direction. That's why both −7 and 7 produce 7.

By this point, children should begin noticing something important: functions aren't simply calculations. They're consistent relationships.

Examples 11–15: Functions Students Meet in Algebra 1

In Algebra 1, students work with functions written as equations, represented in tables, and drawn as graphs.

The calculations aren't always difficult. Understanding what the rules describe can be the harder part.

11. Constant Function

Function: f(x) = 4

Try x = 1, x = 10, or x = −100.

The output is always 4.

Its graph is a horizontal line because the output never changes.

12. Identity Function

Function: f(x) = x

If x = 9, the output is 9.

If x = −3, the output is −3.

This function leaves every input unchanged. Its graph is a straight diagonal line passing through the origin.

13. Decreasing Linear Function

Function: f(x) = −2x + 6

When x = 2:

−2(2) + 6 = 2

Every time x increases by one, the output decreases by two.

That predictable change produces a straight line sloping downward.

14. Quadratic Function

Function: f(x) = x² − 4

When x = 3:

9 − 4 = 5

Unlike a linear function, this rule creates a curved graph called a parabola.

Children don't need to master every property of a parabola immediately. Seeing that different rules produce different graph shapes is a meaningful start.

15. Square-Root Function

Function: f(x) = √x, for x ≥ 0

If x = 25, the output is 5.

If x = 36, the output is 6.

The input restriction matters because we're working with real-number outputs. Negative inputs aren't allowed for this particular real-valued function.

Examples 16–20: Real-Life Functions Kids Can Understand

Functions might look abstract on worksheets. But the underlying idea appears everywhere: one changing quantity determines another.

16. Buying Pencils

Suppose every pencil costs $2.

Function: C(n) = 2n

Buying six pencils costs:

2 × 6 = $12

Here, n represents the number of pencils, and C(n) represents the total cost.

17. Saving Weekly Allowance

A child saves $5 every week, starting with nothing.

Function: A(w) = 5w

After eight weeks:

5 × 8 = $40

Ask what happens after twelve weeks, or how long it takes to save $100.

Suddenly, the function becomes a savings plan.

18. Converting Celsius to Fahrenheit

Function: F(c) = 1.8c + 32

When the temperature is 20°C:

1.8(20) + 32 = 68°F

The function converts one temperature measurement into another. It's also a practical reminder that not all functions involve money or school exercises.

19. Calculating Taxi Fare

Imagine a taxi company charges $4 to start a ride and $2 per mile.

Function: C(m) = 4 + 2m

For a five-mile journey:

4 + 2(5) = $14

Notice that the initial charge is included even when the distance is zero. That $4 is the starting value of the function.

20. Finding a Rectangle's Perimeter

A rectangle has a fixed width of three units. Its length can change.

Function: P(l) = 2l + 6, where l > 0.

For a length of five units:

2(5) + 6 = 16 units

This example connects algebra with geometry. Changing the length changes the perimeter according to a predictable rule.

Examples 21–25: Function Practice Problems With Answers

These final examples are short enough for a quick practice session. Let your child try them before looking at the solutions.

21. Find f(3)

Given f(x) = x + 7, calculate f(3).

Replace x with 3:

3 + 7 = 10

22. Evaluate a Negative Input

Given f(x) = 3x + 1, find f(−2).

3(−2) + 1 = −5

Watch the negative sign. It's one of the easiest details to overlook.

23. Find the Missing Input

Given f(x) = 2x + 4, what input produces 18?

Set up the equation:

2x + 4 = 18

2x = 14

x = 7

Working backward is especially useful when students begin solving algebraic equations.

24. Complete an Input-Output Pattern

Given f(x) = x² + 2, find the outputs for x = 0, 1, 2, and 3.

The answers are:

f(0) = 2

f(1) = 3

f(2) = 6

f(3) = 11

The outputs don't increase by the same amount each time. That's one way to notice that the function isn't linear.

25. Compare Two Functions

Function A: f(x) = 2x + 1

Function B: g(x) = x + 4

Which produces the larger output when x = 2?

Function A: 2(2) + 1 = 5

Function B: 2 + 4 = 6

Function B is larger by 1.

Now change x to 5. Function A produces 11, while Function B produces 9.

Which function is larger now? Why did the answer change?

Questions like these move students beyond calculations and toward understanding how functions behave.

How Can Kids Tell if a Relation Is a Function?

Remember the central rule: one input must lead to exactly one output.

Consider these two relationships.

Relationship A:

  • Input 1 → Output 4

  • Input 2 → Output 6

  • Input 3 → Output 8

This is a function.

Relationship B:

  • Input 1 → Output 4

  • Input 1 → Output 7

  • Input 3 → Output 8

This is not a function because input 1 has two different outputs.

What is the vertical line test?

When a function is shown on a graph, imagine drawing a vertical line through it.

If any vertical line crosses the graph more than once, the graph doesn't represent a function of x.

For example, a typical U-shaped parabola passes this test. A circle doesn't.

A simple activity: draw a straight line, a parabola, and a circle. Ask your child to identify the functions before trying the vertical line test.

A quick method to check functions. A graph is a function only when no vertical line intersects it more than one time.

Pre-Algebra vs. Algebra: What Grade Do Kids Start Learning Functions?

Children often encounter the ideas behind functions years before they're introduced to the word function.

In elementary math, they explore number patterns, missing values, and relationships between quantities.

Pre-algebra builds on those experiences with variables, expressions, negative numbers, and equations. In Algebra 1, students study functions more formally, including linear equations and graphs.

What grade do students start algebra?

In the United States, many students take Algebra 1 in 8th or 9th grade, although placement varies by school district and readiness.

The Common Core State Standards include formal work with functions in Grade 8. Students may encounter related mathematical patterns in earlier grades.

So if your child is in elementary school, there's no need to rush into formal function notation just because another student has started algebra.

How do you know if your child is ready for algebra?

A better question than “What grade should my child take algebra?” might be “Which math skills can my child confidently use?”

Look at whether your child can:

  • Work with fractions, decimals, and negative numbers

  • Recognize and describe number patterns

  • Follow the order of operations

  • Understand that a letter can represent a number

  • Solve simple equations

  • Explain how an input-output rule works

Some children understand arithmetic procedures but struggle when numbers become variables. Others can solve equations yet find graphs confusing.

Those differences matter.

Research published by NWEA in 2026 emphasizes that algebra placement should account for students' readiness, not just their grade level. Earlier placement can work well for prepared students, while those with gaps in foundational skills may need targeted support.

How ACE Academy Can Support Algebra Readiness

If your child is moving from arithmetic into pre-algebra, it may help to practise concepts through concrete examples and visual representations before working entirely with symbols.

ACE Academy Math uses a Singapore Math-informed Concrete Pictorial Abstract approach, helping students connect hands-on or familiar mathematical ideas with diagrams and equations.

For families considering extra support, ACE Academy offers math learning programs and trial classes.

Explore ACE Academy Math and book a free trial class to learn more about the program and whether it fits your child's current learning needs.

How Can Parents Help Kids Understand Algebra Functions at Home?

You don't need to turn the kitchen table into a classroom.

A few small activities can make function concepts easier to understand.

Play a five-minute function-machine game

Choose a secret rule, such as “multiply by 2, then add 1.”

Tell your child:

  • Input 2 gives output 5.

  • Input 3 gives output 7.

  • Input 4 gives output 9.

Can they guess the rule?

Then switch roles and let them invent one.

Use shopping and savings examples

Ask how much four identical notebooks would cost, or how savings grow when the same amount is added each week.

These are familiar situations where one quantity determines another.

Ask for explanations, not just answers

If your child correctly calculates f(3) = 11, ask how they got there.

Could they use the same rule for another input? Could they explain it without looking at the equation?

A correct answer is useful. Understanding why it works is what helps when the questions become unfamiliar.

Frequently Asked Questions About Functions in Algebra

1. What is a function in algebra in simple terms?

A function is a mathematical rule that assigns exactly one output to every allowed input. For example, f(x) = x + 5 adds five to the input. If the input is 3, the output must be 8.

2. What is the difference between a function and an equation?

An equation states that two expressions are equal. A function assigns an output to each input according to a rule. An equation such as y = 2x + 1 defines a function, but not every equation describes y as a function of x.

3. Do kids learn functions in pre-algebra?

Yes, students often explore function-related ideas through number patterns, input-output tables, variables, and simple equations. Formal function notation and more complex graphing typically receive greater attention in Algebra 1 and related courses.

4. What grade do you start algebra in the United States?

Algebra 1 is commonly offered in 8th or 9th grade. Some students follow accelerated pathways, while others spend more time developing pre-algebra skills. Grade placement depends on the school and the student's readiness.

5. What should my child know before starting Algebra 1?

Useful foundations include fractions, decimals, ratios, negative numbers, arithmetic fluency, and basic equations. Recognizing patterns and explaining mathematical relationships can also make the transition to functions easier.

Final Thoughts: Helping Your Child Feel More Confident With Algebra

Understanding what is a function in algebra starts with one simple idea: each input has exactly one output.

Once children grasp that rule, they can begin exploring input-output tables, equations, graphs, and real-life relationships. Start with basic examples, give them room to experiment, and pay attention to how they explain their thinking.

If your child is preparing for pre-algebra or Algebra 1 and would benefit from structured math practice, visit ACE Academy Math to explore a free trial class and see what learning support is available.

Learn Chinese with LingoAce
ACE Academy Math helps every child learn from the best. Designed by top math educators, our program builds strong skills, confidence, and lifelong logical thinking.We select and train elite instructors to deliver clear, engaging, results-driven lessons. Through proven strategies and structured practice, students master essential concepts step by step.Our mission is simple: strengthen math foundations and help every child succeed—in school and beyond.