Algebra of Functions
Equality of Functions
Two functions \( f(x) \) and \( g(x) \) are said to be equal if:
- They have the same domain.
- For every \( x \) in the domain, \( f(x) = g(x) \).
This means the two functions produce the same outputs for all inputs in their domain, even if their expressions appear different.
Example: \( |x| \) and \( (\sqrt{x^2}) \)
-
Definition of \( |x| \):
\[ |x| = \begin{cases} x & x \geq 0, \\ -x & x < 0. \end{cases} \] -
Definition of \( (\sqrt{x^2}) \):
\[ (\sqrt{x^2}) = \begin{cases} x & x \geq 0, \\ -x & x < 0. \end{cases} \]
From these definitions, it is clear that:
Thus, \( |x| \) and \( (\sqrt{x^2}) \) are equal functions, as they produce the same output for all \( x \) in their domain.
Algebra of Functions
Let \( f \) and \( g \) be two functions with domains \( D_f \) and \( D_g \), respectively. The algebra of functions involves combining \( f \) and \( g \) using operations such as addition, subtraction, multiplication, and division. These operations are performed pointwise, meaning they are applied to each input \( x \) where both \( f(x) \) and \( g(x) \) are defined.
1. Addition of Functions
The sum of two functions, \( f \) and \( g \), is defined as:
This is referred to as pointwise addition because the values of \( f \) and \( g \) are added for the same input \( x \).
-
Domain: The domain of \( f + g \) is the intersection of the domains of \( f \) and \( g \):
\[ \text{Domain of } (f + g) = D_f \cap D_g. \]
Graphically, the graph of \( f + g \) is obtained by adding the \( y \)-coordinates of \( f(x) \) and \( g(x) \) for each \( x \) in the common domain.
2. Subtraction of Functions
The difference of two functions, \( f \) and \( g \), is defined as:
Similar to addition, this is also performed pointwise.
-
Domain: The domain of \( f - g \) is the same as for addition:
\[ \text{Domain of } (f - g) = D_f \cap D_g. \]
3. Multiplication of Functions
The product of two functions, \( f \) and \( g \), is defined as:
This is referred to as pointwise multiplication since the values of \( f \) and \( g \) are multiplied for each input \( x \).
-
Domain: The domain of \( f \cdot g \) is the intersection of the domains of \( f \) and \( g \):
\[ \text{Domain of } (f \cdot g) = D_f \cap D_g. \]
4. Division of Functions
The quotient of two functions, \( f \) and \( g \), is defined as:
This is called pointwise division.
-
Domain: The domain of \( \frac{f}{g} \) is the intersection of the domains of \( f \) and \( g \), excluding points where \( g(x) = 0 \):
\[ \text{Domain of } \left(\frac{f}{g}\right) = D_f \cap D_g \setminus \{x : g(x) = 0\}. \]
Key Insights
- All operations (addition, subtraction, multiplication, and division) are performed pointwise, meaning the operation is applied to \( f(x) \) and \( g(x) \) at the same \( x \).
- The domain of the resulting function is always the intersection of the domains of \( f \) and \( g \), with additional restrictions for division to exclude zeros of \( g(x) \).
By combining functions algebraically, we can create new functions that inherit properties from \( f \) and \( g \), while their domains depend on the overlap of \( D_f \) and \( D_g \). Graphical representations show how these operations affect the shape of the resulting function.
Illustrative Example
Let \( f(x) = x^2 - 1 \) and \( g(x) = x + 2 \). The domains of \( f(x) \) and \( g(x) \) are \( (-\infty, \infty) \).
-
Addition:
\[ (f + g)(x) = (x^2 - 1) + (x + 2) = x^2 + x + 1. \]Domain: \( (-\infty, \infty) \).
-
Subtraction:
\[ (f - g)(x) = (x^2 - 1) - (x + 2) = x^2 - x - 3. \]Domain: \( (-\infty, \infty) \).
-
Multiplication:
\[ (f \cdot g)(x) = (x^2 - 1)(x + 2) = x^3 + 2x^2 - x - 2. \]Domain: \( (-\infty, \infty) \).
-
Division:
\[ \left(\frac{f}{g}\right)(x) = \frac{x^2 - 1}{x + 2}. \]Domain: \( (-\infty, \infty) \setminus \{-2\} \), since \( g(x) = 0 \) at \( x = -2 \).
Performing Algebra on Piecewise-Defined Functions
To perform algebraic operations on piecewise-defined functions such as addition, subtraction, multiplication, or division, the process involves a structured approach to ensure correctness. The steps are outlined below.
1. Analyze and Unify Intervals
First, examine the intervals over which each function is defined. If the intervals differ between the two functions, divide the domain into unified intervals that include all boundaries where either function's expression changes. This ensures that the operations are performed consistently across all intervals.
2. Rewrite Functions on Unified Intervals
Once the intervals are unified, rewrite each function on these intervals. For each interval, determine the expression of the function and ensure it is well-defined over the new domain. This step aligns the functions for direct algebraic manipulation.
3. Perform the Desired Operation
Within each unified interval, apply the desired algebraic operation:
- Addition: \( (f + g)(x) = f(x) + g(x) \),
- Subtraction: \( (f - g)(x) = f(x) - g(x) \),
- Multiplication: \( (f \cdot g)(x) = f(x) \cdot g(x) \),
- Division: \( \left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)} \), provided \( g(x) \neq 0 \).
4. Combine Results into a New Piecewise Function
The results for each interval are combined to form the new piecewise function. Explicitly define the expression for each interval and specify whether boundaries are included (closed) or excluded (open) to avoid ambiguity.
Addition of Two Piecewise Functions
Given,
Step 1: Unify Intervals
The intervals for \( f(x) \) and \( g(x) \) suggest dividing the domain into:
- \( x < 0 \),
- \( 0 \leq x \leq 1 \),
- \( x > 1 \).
Step 2: Rewrite Functions
Rewrite \( f(x) \) and \( g(x) \) on these intervals:
-
For \( x < 0 \):
\( f(x) = x - 1 \), \( g(x) = x + 2 \).
-
For \( 0 \leq x \leq 1 \):
\( f(x) = x + 1 \), \( g(x) = x + 2 \).
-
For \( x > 1 \):
\( f(x) = x + 1 \), \( g(x) = 2x + 1 \).
Step 3: Perform Addition
Add \( f(x) \) and \( g(x) \) on each interval:
-
For \( x < 0 \):
\[ (f + g)(x) = (x - 1) + (x + 2) = 2x + 1. \] -
For \( 0 \leq x \leq 1 \):
\[ (f + g)(x) = (x + 1) + (x + 2) = 2x + 3. \] -
For \( x > 1 \):
\[ (f + g)(x) = (x + 1) + (2x + 1) = 3x + 2. \]
Step 4: Combine Results
The final piecewise function is:
Composition of Functions
Let \( f: A \to B \) and \( g: C \to D \) be two functions. The composition of \( f \) and \( g \) is a function, and its concept can be illustrated using the following figures:
The input \( x \) is first passed into the function \( f \), which produces an output \( f(x) \). This output \( f(x) \) then becomes the input of the function \( g \). The final output is \( g(f(x)) \), which is written in shorthand as \( g \circ f(x) \). This process is considered to occur through a single function \( g \circ f \), known as the composition of \( f \) and \( g \).
If the input instead first goes through \( g \) and then through \( f \), the resulting composition is denoted by \( f \circ g(x) \).
Now consider the composition \( g \circ f \). The domain of \( f \) is \( A \), but not all inputs from \( A \) can necessarily be used in \( g \circ f \). Why? Because the output of \( f \) might not lie within the domain of \( g \), which is \( C \).
This leads to the following condition for the allowed inputs:
Only those inputs from \( A \) are allowed for which the output of \( f \) lies in the domain of \( g \).
Thus, the domain of \( g \circ f \) is not necessarily the same as the domain of \( f \).
The domain of \( g \circ f \) is:
Similarly, for the composition \( f \circ g \), the domain is:
Generally, we aim to define functions in a neat way so that the conditions for composition are automatically satisfied.
For example, it is convenient to define \( f: A \to B \) and \( g: B \to C \). In this case, the domain of \( g \circ f \) is clearly \( A \) itself. Why? Because the co-domain of \( f \) equals the domain of \( g \), implying that the range of \( f \) is a subset of the domain of \( g \).
However, we cannot say the same about \( f \circ g \), as the co-domain of \( g \) might not align with the domain of \( f \).
If we instead define \( f: A \to B \) and \( g: B \to A \), then both \( f \circ g \) and \( g \circ f \) are well-defined, with their respective domains being \( B \) and \( A \). This ensures compositional compatibility.
Definition
Let \( f: A \to B \) and \( g: C \to D \) be two functions. The composition of functions creates a new function by applying one function to the result of another. The composition \( g \circ f \) is defined more rigoruously as follows:
Similarly, the composition \( f \circ g \) is defined as:
Meaning of the Definition
The definition describes the requirements for composing two functions:
-
For \( g \circ f \):
- The input \( x \) must belong to the domain of \( f \), which is \( A \).
- The output of \( f(x) \) must lie within the domain of \( g \), which is \( C \).
- The final output of the composition \( g \circ f \) is given by \( g(f(x)) \).
-
For \( f \circ g \):
- The input \( x \) must belong to the domain of \( g \), which is \( C \).
- The output of \( g(x) \) must lie within the domain of \( f \), which is \( B \).
- The final output of the composition \( f \circ g \) is given by \( f(g(x)) \).
Example
The functions \( f \) and \( g \) are given as ordered pairs:
- \( f: \{1, 2, 3, 4, 5, 6, 7\} \to \{a, b, c, d, e, f, g\} \),
- \( g: \{d, e, f, g, h, i, j\} \to \{1, 2, 3, 4, 5\} \).
To find \( g \circ f \), we determine the composition as:
For the given data:
This result represents the composition \( g \circ f \), which can be visualized through appropriate mappings in a figure.
Finding Mathematical Expressions for Compositions
When functions \( f(x) \) and \( g(x) \) are defined explicitly using mathematical expressions, the composition \( f \circ g(x) \) or \( g \circ f(x) \) is determined by substituting the expression of one function into the other. Here’s how to calculate the composition and its exhaustive domain step by step:
Composition \( f \circ g(x) \)
To compute \( f \circ g(x) \), substitute \( g(x) \) into \( f(x) \):
Domain of \( f \circ g \):
The domain of \( f \circ g \) consists of all \( x \) that satisfy:
- \( x \in \text{Domain of } g \).
- \( g(x) \in \text{Domain of } f \).
Thus:
Composition \( g \circ f(x) \)
To compute \( g \circ f(x) \), substitute \( f(x) \) into \( g(x) \):
Domain of \( g \circ f \):
The domain of \( g \circ f \) consists of all \( x \) that satisfy:
- \( x \in \text{Domain of } f \).
- \( f(x) \in \text{Domain of } g \).
Thus:
Example
Given \( f(x) = \sqrt{x} \), \( g(x) = 4 - x^2 \). Find \( f \circ g(x) \) and \( g \circ f(x) \)
Solution:
Finding \( f \circ g(x) \):
To compute \( f \circ g(x) \), substitute \( g(x) \) into \( f(x) \):
Domain of \( f \circ g(x) \):
For \( f \circ g(x) \) to be defined:
- \( x \) must belong to the domain of \( g(x) \), which is \( \mathbb{R} \).
- \( g(x) = 4 - x^2 \) must belong to the domain of \( f(x) \), which is \( [0, \infty) \).
This requires \( g(x) \geq 0 \), i.e., \( 4 - x^2 \geq 0 \). Solving this inequality:
Thus, the domain of \( f \circ g(x) \) is:
Final Expression for \( f \circ g(x) \):
Finding \( g \circ f(x) \):
To compute \( g \circ f(x) \), substitute \( f(x) \) into \( g(x) \):
Domain of \( g \circ f(x) \):
For \( g \circ f(x) \) to be defined:
- \( x \) must belong to the domain of \( f(x) \), which is \( [0, \infty) \).
- \( f(x) = \sqrt{x} \) must belong to the domain of \( g(x) \), which is \( \mathbb{R} \).
Both conditions are satisfied for all \( x \in [0, \infty) \).
Thus, the domain of \( g \circ f(x) \) is:
Final Expression for \( g \circ f(x) \):
Example
Given \( f(x) = \sin x \), \( g(x) = e^x \). Find \( f \circ g(x) \) and \( g \circ f(x) \)
Solution:
Finding \( f \circ g(x) \):
To compute \( f \circ g(x) \), substitute \( g(x) \) into \( f(x) \):
Domain of \( f \circ g(x) \):
For \( f \circ g(x) \) to be defined:
- \( x \) must belong to the domain of \( g(x) \), which is \( \mathbb{R} \).
- \( g(x) = e^x \) must belong to the domain of \( f(x) \), which is \( \mathbb{R} \).
Since both conditions are satisfied for all \( x \in \mathbb{R} \), the domain of \( f \circ g(x) \) is:
Final Expression for \( f \circ g(x) \):
Finding \( g \circ f(x) \):
To compute \( g \circ f(x) \), substitute \( f(x) \) into \( g(x) \):
Domain of \( g \circ f(x) \):
For \( g \circ f(x) \) to be defined:
- \( x \) must belong to the domain of \( f(x) \), which is \( \mathbb{R} \).
- \( f(x) = \sin x \) must belong to the domain of \( g(x) \), which is \( \mathbb{R} \).
Since both conditions are satisfied for all \( x \in \mathbb{R} \), the domain of \( g \circ f(x) \) is:
Final Expression for \( g \circ f(x) \):
Composition is Not Commutative
Let \( f(x) = x + 1 \) and \( g(x) = 1 - 2x \). We will compute \( f \circ g(x) \) and \( g \circ f(x) \) to demonstrate that composition is not commutative.
\( f \circ g(x) \)
The composition \( f \circ g(x) \) is defined as:
Substituting \( g(x) = 1 - 2x \) into \( f(x) = x + 1 \):
\( g \circ f(x) \)
The composition \( g \circ f(x) \) is defined as:
Substituting \( f(x) = x + 1 \) into \( g(x) = 1 - 2x \):
From the above calculations:
Clearly:
This example demonstrates that composition is not commutative. The order in which functions are applied affects the resulting expression, making \( f \circ g \) generally different from \( g \circ f \).
Composition of Functions is Associative
Let \( f: A \to B \), \( g: B \to C \), and \( h: C \to D \). The composition of functions satisfies the associative property:
Proof:
Step 1: Both sides map \( A \to D \)
-
Left-hand side \( h \circ (g \circ f) \):
- \( f: A \to B \) implies \( f(x) \in B \) for all \( x \in A \).
- \( g: B \to C \) implies \( g(f(x)) \in C \) for all \( f(x) \in B \).
- \( h: C \to D \) implies \( h(g(f(x))) \in D \) for all \( g(f(x)) \in C \).
Thus, \( h \circ (g \circ f) \) maps \( A \to D \).
-
Right-hand side \( (h \circ g) \circ f \):
- \( g: B \to C \) implies \( g(y) \in C \) for all \( y \in B \).
- \( h: C \to D \) implies \( h(g(y)) \in D \) for all \( g(y) \in C \). Therefore, \( h \circ g: B \to D \).
- \( f: A \to B \) implies \( (h \circ g)(f(x)) \in D \) for all \( f(x) \in B \).
Thus, \( (h \circ g) \circ f \) also maps \( A \to D \).
Since both sides map \( A \to D \), they have the same domain and codomain.
Step 2: Equality of Functions
To prove equality of functions, we show that for all \( x \in A \):
-
Left-hand side (\( h \circ (g \circ f)(x) \)):
\[ h \circ (g \circ f)(x) = h((g \circ f)(x)) = h(g(f(x))). \] -
Right-hand side (\( (h \circ g) \circ f(x) \)):
\[ (h \circ g) \circ f(x) = (h \circ g)(f(x)) = h(g(f(x))). \]
Since both sides evaluate to \( h(g(f(x))) \) for all \( x \in A \), we conclude:
Since \( h \circ (g \circ f) \) and \( (h \circ g) \circ f \) map \( A \to D \) and are equal for all \( x \in A \), it follows that:
Thus, the composition of functions is associative.
Composition with the Identity Function
Let \( f: A \to B \) be a function. The composition of \( f \) with the identity function satisfies the following properties:
-
Composition with the identity function on \( B \):
\[ I_B \circ f = f, \]where \( I_B: B \to B \) is the identity function on \( B \) defined by \( I_B(y) = y \) for all \( y \in B \).
-
Composition with the identity function on \( A \):
\[ f \circ I_A = f, \]where \( I_A: A \to A \) is the identity function on \( A \) defined by \( I_A(x) = x \) for all \( x \in A \).
Proof:
Part 1: \( I_B \circ f = f \)
The composition \( I_B \circ f \) is defined as:
Since \( I_B(y) = y \) for all \( y \in B \), we have:
Thus:
Part 2: \( f \circ I_A = f \)
The composition \( f \circ I_A \) is defined as:
Since \( I_A(x) = x \) for all \( x \in A \), we have:
Thus:
\(\blacksquare\)
Composition of piecewise-defined functions:
Find \( f(g(x)) \) and \( g(f(x)) \).
Solution:
Now since \( g(x) \) is defined in two pieces, one for \( x < 1 \) and \( x \geq 1 \), we put each piece one by one. First replace \(g(x)\) by \(3x\) every where in the expression, but this is true when \(x<1\). Then replace \(g(x)\) by \(x+2\) everywhere again, which is true when \(x\geq 1\). This results in four rows.
Simplify the inequations in each row:
Now let us find \( g(f(x)) \):
\(\blacksquare\)
Let us go through another problem:
Given:
Find \( f(g(x)) \)
Solution:
Remove empty cases,
\(\blacksquare\)