Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Function Arithmetic






Building Functions from Functions

Functions can be combined through the same operations that combine numbers. Add two functions, and their outputs add. Multiply two functions, and their outputs multiply. The result in each case is a new function — one whose behavior emerges from the interplay of its components.

These operations extend the toolkit for constructing and analyzing functions. A profit function is revenue minus cost. A density function is mass divided by volume. Combining functions arithmetically is how mathematical models capture relationships that involve multiple contributing factors.



Combining Functions with Operations

Functions combine through arithmetic operations just as numbers do. Given two functions ff and gg, their sum, difference, product, and quotient are new functions defined pointwise — by performing the operation on the outputs at each input.

The operations act on outputs, not on inputs. To find (f+g)(3)(f + g)(3), evaluate f(3)f(3) and g(3)g(3) separately, then add the results. The input 33 passes through both functions; their outputs combine.

This pointwise definition means that combining functions produces new functions. If f(x)=x2f(x) = x^2 and g(x)=3xg(x) = 3x, then (f+g)(x)=x2+3x(f + g)(x) = x^2 + 3x is a single function with its own formula, graph, and properties.

The four arithmetic operations — addition, subtraction, multiplication, and division — each have their own notation and rules. All share the principle: operate on outputs while the input remains the same.

These combinations differ from composition, which chains functions together rather than combining their outputs. Arithmetic combines outputs at the same input; composition feeds the output of one function into the input of another.

Sum of Functions

The sum of two functions ff and gg is the function (f+g)(f + g) defined by:

(f+g)(x)=f(x)+g(x)(f + g)(x) = f(x) + g(x)


At each input xx, evaluate both functions and add their outputs.

If f(x)=x2f(x) = x^2 and g(x)=5x3g(x) = 5x - 3, then:

(f+g)(x)=x2+5x3(f + g)(x) = x^2 + 5x - 3


To evaluate at a specific point, say x=2x = 2:

(f+g)(2)=f(2)+g(2)=4+7=11(f + g)(2) = f(2) + g(2) = 4 + 7 = 11


The same result comes from the combined formula: 4+103=114 + 10 - 3 = 11.

Addition is commutative: f+g=g+ff + g = g + f. It is also associative: (f+g)+h=f+(g+h)(f + g) + h = f + (g + h). These properties mirror the arithmetic of numbers.

Sums of functions appear throughout applications. Total cost is fixed cost plus variable cost. Combined revenue is revenue from product A plus revenue from product B. Net force is the sum of individual forces.

Difference of Functions

The difference of two functions ff and gg is the function (fg)(f - g) defined by:

(fg)(x)=f(x)g(x)(f - g)(x) = f(x) - g(x)


At each input xx, evaluate both functions and subtract the second from the first.

If f(x)=3x+7f(x) = 3x + 7 and g(x)=x2g(x) = x^2, then:

(fg)(x)=3x+7x2=x2+3x+7(f - g)(x) = 3x + 7 - x^2 = -x^2 + 3x + 7


Order matters. The function fgf - g is not the same as gfg - f. If (fg)(x)=x2+3x+7(f - g)(x) = -x^2 + 3x + 7, then (gf)(x)=x23x7(g - f)(x) = x^2 - 3x - 7. The outputs are negatives of each other:

(gf)(x)=(fg)(x)(g - f)(x) = -(f - g)(x)


Subtraction is neither commutative nor associative. Care with order and grouping is essential.

Differences of functions model comparisons. Profit is revenue minus cost. Net change is final value minus initial value. The gap between two quantities is the difference of the functions measuring them.

Product of Functions

The product of two functions ff and gg is the function (fg)(f \cdot g) or (fg)(fg) defined by:

(fg)(x)=f(x)g(x)(f \cdot g)(x) = f(x) \cdot g(x)


At each input xx, evaluate both functions and multiply their outputs.

If f(x)=x+2f(x) = x + 2 and g(x)=x3g(x) = x - 3, then:

(fg)(x)=(x+2)(x3)=x2x6(fg)(x) = (x + 2)(x - 3) = x^2 - x - 6


The product of two linear functions is a quadratic. The product of two polynomials is a polynomial whose degree is the sum of the degrees.

Multiplication is commutative: fg=gffg = gf. It is associative: (fg)h=f(gh)(fg)h = f(gh). It distributes over addition: f(g+h)=fg+fhf(g + h) = fg + fh.

Products of functions arise in area calculations (length times width), in physics (mass times acceleration), and in probability (independent probabilities multiply). When two quantities combine multiplicatively, their functions multiply.

Quotient of Functions

The quotient of two functions ff and gg is the function (f/g)(f/g) defined by:

(fg)(x)=f(x)g(x)\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}


At each input xx, evaluate both functions and divide the first output by the second.

If f(x)=x21f(x) = x^2 - 1 and g(x)=x+1g(x) = x + 1, then:

(fg)(x)=x21x+1=(x1)(x+1)x+1=x1\left(\frac{f}{g}\right)(x) = \frac{x^2 - 1}{x + 1} = \frac{(x-1)(x+1)}{x+1} = x - 1


provided x1x \neq -1.

Division introduces a critical restriction: the denominator cannot be zero. Even if the simplified form appears to have no restriction, the original quotient is undefined where g(x)=0g(x) = 0. The function (f/g)(f/g) has a hole at x=1x = -1, not a continuous extension.

Division is neither commutative nor associative. The quotient f/gf/g differs from g/fg/f unless both equal 11.

Quotients of functions model rates and ratios. Average cost is total cost divided by quantity. Speed is distance divided by time. Efficiency is output divided by input.

Notation and Evaluation at a Point

The notations (f+g)(x)(f + g)(x) and f(x)+g(x)f(x) + g(x) mean the same thing. The first emphasizes that f+gf + g is itself a function; the second emphasizes the operation on outputs. Both describe the same value.

Evaluating a combined function at a specific input can proceed two ways.

Method 1: Evaluate each function separately, then combine.

For (fg)(4)(f - g)(4) where f(x)=x2f(x) = x^2 and g(x)=2x+1g(x) = 2x + 1:

f(4)=16,g(4)=9f(4) = 16, \quad g(4) = 9

(fg)(4)=169=7(f - g)(4) = 16 - 9 = 7


Method 2: Find the combined formula first, then evaluate.

(fg)(x)=x22x1(f - g)(x) = x^2 - 2x - 1

(fg)(4)=1681=7(f - g)(4) = 16 - 8 - 1 = 7


Both methods yield the same result. The first is often faster for a single evaluation; the second is necessary when working with the combined function repeatedly.

When functions are given as tables or graphs, only Method 1 applies directly — look up each function value and combine.

Domain of Combined Functions

The domain of a combined function is restricted to inputs that work for both component functions. An input must be in the domain of ff and in the domain of gg for the combination to be defined.

For sums, differences, and products:

Domain of f+g,fg,fg=Domain of fDomain of g\text{Domain of } f + g, f - g, f \cdot g = \text{Domain of } f \cap \text{Domain of } g


The intersection ensures both functions can be evaluated.

If f(x)=xf(x) = \sqrt{x} with domain [0,)[0, \infty) and g(x)=4xg(x) = \sqrt{4 - x} with domain (,4](-\infty, 4], then:

Domain of f+g=[0,)(,4]=[0,4]\text{Domain of } f + g = [0, \infty) \cap (-\infty, 4] = [0, 4]


Only inputs from 00 to 44 lie in both domains.

Different component functions can shrink the combined domain dramatically. If ff is defined for x>0x > 0 and gg is defined for x<0x < 0, their intersection is empty — the combined function has no valid inputs.

Additional Restrictions for Quotient

The quotient f/gf/g inherits all the restrictions of both ff and gg, plus one more: the denominator g(x)g(x) cannot equal zero.

Domain of fg=(Domain of fDomain of g){x:g(x)=0}\text{Domain of } \frac{f}{g} = (\text{Domain of } f \cap \text{Domain of } g) \setminus \{x : g(x) = 0\}


Start with the intersection of domains, then remove any points where gg equals zero.

If f(x)=x+3f(x) = x + 3 and g(x)=x24g(x) = x^2 - 4, both have domain (,)(-\infty, \infty). The intersection is all real numbers. But g(x)=0g(x) = 0 when x=2x = 2 or x=2x = -2. So:

Domain of fg=(,2)(2,2)(2,)\text{Domain of } \frac{f}{g} = (-\infty, -2) \cup (-2, 2) \cup (2, \infty)


Even if the quotient simplifies algebraically to a function with no apparent restriction, the original domain exclusions remain. The quotient x21x1=x+1\dfrac{x^2 - 1}{x - 1} = x + 1 simplifies, but the domain still excludes x=1x = 1. The graph has a hole at (1,2)(1, 2).

Graphical Interpretation

Combining functions graphically means combining their heights at each xx-value.

For the sum f+gf + g, the height of the combined graph at any xx equals the sum of the heights of ff and gg at that xx. If f(3)=2f(3) = 2 and g(3)=5g(3) = 5, then (f+g)(3)=7(f + g)(3) = 7. The point (3,7)(3, 7) lies on the graph of f+gf + g.

Where both functions are positive, the sum is higher than either. Where one is positive and one is negative, they partially cancel. Where both are negative, the sum is more negative than either.

For the product fgfg, the height at xx is f(x)g(x)f(x) \cdot g(x). Where both are positive or both are negative, the product is positive. Where they have opposite signs, the product is negative. Where either equals zero, the product equals zero — the zeros of ff and gg are zeros of fgfg.

Graphing combined functions by hand is labor-intensive — each point requires reading two values and computing. But the concept clarifies what the algebra produces: a new curve whose shape emerges from the interaction of two others.

Algebraic Simplification

Combined functions often simplify to cleaner forms. Simplification makes evaluation easier and reveals structure.

For sums and differences, combine like terms:

(3x2+2x1)+(x25x+4)=4x23x+3(3x^2 + 2x - 1) + (x^2 - 5x + 4) = 4x^2 - 3x + 3


For products, distribute and combine:

(x+3)(x2)=x2+x6(x + 3)(x - 2) = x^2 + x - 6


For quotients, factor and reduce when possible:

x29x+3=(x3)(x+3)x+3=x3(x3)\frac{x^2 - 9}{x + 3} = \frac{(x-3)(x+3)}{x+3} = x - 3 \quad (x \neq -3)


Simplification must respect domain restrictions. The reduced form x3x - 3 appears defined everywhere, but the original quotient excludes x=3x = -3. The simplified function still has a hole at that point.

Simplified forms make further analysis easier — finding zeros, identifying end behavior, computing additional values. They also reveal when two apparently different expressions define the same function.

Building Complex Functions

Simple functions combine to build complex ones. Understanding the components reveals the structure of the whole.

The function h(x)=x2+3x5h(x) = x^2 + 3x - 5 can be viewed as the sum of f(x)=x2f(x) = x^2, g(x)=3xg(x) = 3x, and k(x)=5k(x) = -5. Each component contributes: the parabolic shape from x2x^2, the linear tilt from 3x3x, the vertical shift from 5-5.

The function h(x)=(x2)(x+5)h(x) = (x - 2)(x + 5) is a product of two linear functions. Its zeros come directly from its factors: x=2x = 2 and x=5x = -5. Its graph is a parabola opening upward.

Breaking a function into simpler pieces aids both analysis and construction. To model a situation, identify the contributing factors, express each as a function, and combine appropriately.

Revenue depends on price and quantity: R=pqR = p \cdot q. If price is p(x)=502xp(x) = 50 - 2x and quantity is q(x)=xq(x) = x, then revenue is R(x)=(502x)x=50x2x2R(x) = (50 - 2x) \cdot x = 50x - 2x^2. The combined function inherits meaning from its components.

Applications in Context

Function arithmetic models real-world combinations of quantities.

Profit equals revenue minus cost. If R(x)R(x) gives revenue from selling xx units and C(x)C(x) gives the cost of producing them:

P(x)=R(x)C(x)P(x) = R(x) - C(x)


Profit is positive when revenue exceeds cost, negative when cost exceeds revenue, and zero at break-even points where R(x)=C(x)R(x) = C(x).

Average cost is total cost divided by quantity:

Cˉ(x)=C(x)x\bar{C}(x) = \frac{C(x)}{x}


This quotient is undefined at x=0x = 0 (no items produced) and describes cost per unit at each production level.

Combined distance from two moving objects involves sums or differences depending on direction. If d1(t)d_1(t) and d2(t)d_2(t) give positions at time tt, the gap between them is d1(t)d2(t)|d_1(t) - d_2(t)|.

Population models might add birth rate function and subtract death rate function to model net growth. Economic models add multiple income streams or subtract expenses from revenue.

In each case, the arithmetic of functions translates the arithmetic of the situation. What combines additively in reality combines additively in the model.